GC interuptable?

chrisj a at b.c
Sat Dec 16 07:22:04 PST 2006


"Jarrett Billingsley" <kb3ctd2 at yahoo.com> wrote in message 
news:em12j3$6ls$1 at digitaldaemon.com...
> "Sean Kelly" <sean at f4.ca> wrote in message 
> news:elvfpr$1l8j$1 at digitaldaemon.com...
>
>> Are you asking whether it's safe to suspend the GC during a cleanup and 
>> then go do something else?  If so, then my answer is a very tenative 
>> "yes."  The GC suspends all threads it knows about during a collection 
>> (ie. all instances of std.thread.Thread) so each of these threads is 
>> frozen at some point of execution.
>
> This also implies another way to have code run while the GC is running --  
> if you create a thread without using std.thread, the GC won't know about 
> it and won't stop it during the collection.  So it can go ahead and run 
> while the GC is doing its thing.

How hard would it be to stop such a thread buggering up the GC? 





More information about the Digitalmars-d mailing list