A thread-safe weak reference implementation

Robert jfanatiker at gmx.at
Tue Jul 9 14:35:09 PDT 2013


>         if (GC.addrOf(cast(void*)obj))
>             return obj;


Smart :-) You are waiting for the collection to complete, if we 
are one of the threads started before destructor calls happen. 
Brilliant.

Is it ok if I shamelessly copy parts of your implementation for 
the new std.signals? I will of course mention your name.



Best regards,
Robert


More information about the Digitalmars-d mailing list