[gclist] Advice requested

Fergus Henderson fjh@cs.mu.OZ.AU
Wed, 28 Apr 1999 11:31:34 +1000


On 27-Apr-1999, David Chase <chase@world.std.com> wrote:
> At 02:47 PM 4/27/99 +0100, Stephen Biggs wrote:
> >Also, the only C++ garbage collectors I've seen don't cope well with a
> >multi-threaded environment and aren't guaranteed to be 100% correct. I'm
> >told by our Unix programmers here that thread suspension, for a start, is
> >out (so for Unix the option would be to ask the programmer to call garbage
> >collection methods manually, somehow!).
> 
> Untrue, though the solutions to this problem are semi-nasty.  But,
> there are solutions.

Yes.  See the source code of the Boehm (et al) collector for examples,
in particular the functions GC_suspend_handler() and GC_stop_world()
in the *_threads.c files.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3        |     -- the last words of T. S. Garp.