Signals & Slots
Lutger
lutger.blijdestijn at gmail.com
Mon Nov 5 07:26:00 PST 2007
Lars Ivar Igesund wrote:
> Lutger wrote:
...
> Walter claims that the notifyRegister/Unregister method used by among others
> std.signals _are_ threadsafe. If you are using the same methods, can you
> reproduce deadlocks with sslot? It would be nice to have some actual
> evidence in this matter (either way, although I understand that complete
> thread safety may be impossible to prove for an efficient solution).
>
I should have read the docs for std.signals first, it states: "Not safe
for multiple threads operating on the same signals or slots." The thing
is, notifyRegister itself is threadsafe, but when the delegate that it
stores is called all threads are halted so it's really not safe to use
at all in a multithreaded program if you aren't very careful.
More information about the Digitalmars-d
mailing list