From: Kohler Markus <kohlerm@betze.bbn.hp.com>
To: caml-list@pauillac.inria.fr
Subject: Weak pointers (summarize)
Date: Wed, 19 Mar 1997 07:45:16 +0000 [thread overview]
Message-ID: <199703190745.IAA07706@betze.bbn.hp.com> (raw)
In-Reply-To: kohlerm's message of Tue, 18 Mar 1997 17:08:56 +0000. <199703181708.SAA27847@betze.bbn.hp.com>
I would like to summarize our discussion about weak pointers.
1. There are some rare cases were weak pointers are usefull to implement
shared datastructures efficiently. This is probably even more important for
distributed data structures where message sending can be expensive.
It works on your example, because it doesn't matter if the weak pointer
points to valid data or not.
2. One have to be very carefully when using weak pointers. One example is
extending our tree datastructure by an hash based access method. this would
not work anymore with the weak pointer structure.
3. There are other perhaps more clean solutions for that problem :
Since we know that every problem can be solved by an additional level of
indirection, the following solution would be possible.
| | |
Proxy
Hashtable |
|_____A
All pointers to nde a in the tree woudl have to point to a Proxy object,
instead of pointing directly to object A.
When all pointers to the Proxy object are gone it would go away and send a
finalize message to A. A would then inform all it dependent objects "hey i'm
going to be finalized". The dependent objects could then do the appropriate
actions.
4. It would be really nice if pointers would be objects too. The solution in 3
could the be implemented transparently.
Any comments ?
Markus
--
+----------------------------------------------------------------------------+
| Markus Kohler Hewlett-Packard GmbH |
| Software Engineer Network & System Management Division|
| IT/E Success Team |
+----------------------------------------------------------------------------+
prev parent reply other threads:[~1997-03-19 13:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <199703181607.RAA13208@tobago.inria.fr>
1997-03-18 17:08 ` Weak pointers Kohler Markus
1997-03-19 7:45 ` Kohler Markus [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199703190745.IAA07706@betze.bbn.hp.com \
--to=kohlerm@betze.bbn.hp.com \
--cc=caml-list@pauillac.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox