Is there any plans to make working signals in D?

Robert jfanatiker at gmx.at
Mon Apr 15 01:48:59 PDT 2013


> My memories tell me that I was never able to make a _thread safe_ weak
> reference, though. I don't remember exactly, but I think that it was
> because the dispose event happens after all threads have already
> restarted. This means that some thread could extract a strong reference
> from the weak reference before the weak reference knows that the
> underlying object has been destroyed, thus creating a dangling pointer.
> 
You are right, it is not thread safe. Some hook would be needed that
gets called before threads are resumed. It is not an issue for
std.signals2 because it is not meant to be thread safe.

Best regards,
Robert



More information about the Digitalmars-d mailing list