Well sure, but why not use a Mutex? What does trying to sort out a correct lock-free algorithm gain us here?

It is not about concurrency for general purpose (phobosx.signal is no more thread safe than std.signals), but for the GC. A reference is hidden from the GC, when making it visible again you get a race condition with the GC. Ensuring that you really have a valid reference proves to be troublesome.

The problem is that destructors and thus the registered hooks for the dispose events are called when threads are already resumed. If this wasn't the case there would actually be no problems.

Best regards,

Robert

Reply via email to