From: Larry Evans (jcampbell3_at_[hidden])
Date: 2003-05-28 07:14:21
Chuck Messenger wrote:
> Peter Dimov wrote:
>> Chuck Messenger wrote:
> Well, it's in too much flux right now -- perhaps if I ever finish it,
> I'll post it. It's a concurrency library - an implementation of the API
> described in Concurrent Programming in ML.
> Thanks -- that sounds interesting, too -- I've also been told of
> cyclic_ptr, in the contributions. Even if one/both don't do the job,
> they should give me some ideas...
I'm worried about the Concurrent part since I'm guessing that you'd
be using threads. In that case, cyclic_ptr would have to protect
it's phase variable (I think that's what it's called) with maybe
a mutex. This phase variable governs the action of the
smart_ptr::operator=(...). OTOH, I think (since I'm a threads
novice ) that the stl_container.cpp I mentioned in previous post
might be more suitable because code that calculates the "descriptors"
used to traverse the proxy graph can be modified to execute before
the 1st statement of main (via the construction of the static variables).
However, that still leaves the need to synchronize the graph traversal
during garbage collection, which could be done by a "stop-the-world"
method, i.e. have a gc thread stop all other threads which the gc thread
does the collection. You might also check the reference I gave to
terekhov_at_[hidden] which is more tuned to threads (actually multi-processing).
The post containing that reference is at:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk