D2 weak references
Michel Fortin
michel.fortin at michelf.com
Mon Apr 20 15:53:48 PDT 2009
On 2009-04-20 18:31:28 -0400, Sean Kelly <sean at invisibleduck.org> said:
> Yeah. The unfortunate tradeoff is that finalizers are run while all these
> app threads are suspended, and if these finalizers enter a synchronized
> block they're likely to deadlock. This happened enough with the Phobos
> GC that I was motivated to make the change in the first place. It's
> unfortunate, but at least WeakRef is the only victim of the current
> approach that I'm aware of.
Then can't you notify the weak refs, restart the world, and then
finalize the objects for real?
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list