A thread-safe weak reference implementation

David d at dav1d.de
Wed Jul 10 05:48:33 PDT 2013


Am 09.07.2013 23:35, schrieb Robert:
> 
>>         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.

My first thought when I saw this title on the NG, this could work for
std.signals! Thanks for reading it ;)



More information about the Digitalmars-d mailing list