What sync object should i use?

Heinz thor587 at gmail.com
Mon May 13 21:33:00 PDT 2013


> BTW, given recent discussion on memory barriers, I think my 
> previous statement that the mutex does not need to be locked to 
> call notify is probably incorrect.

Haven't had any issues calling notify outside a synchronized 
statement, even from multiple threads. At least this works under 
Win32 with my producer thread all wrapped inside synchronized(). 
Only a single consumer thread is inside synchronized() but then i 
have 2 more threads making naked calls to notify(). Not a single 
crash.


More information about the Digitalmars-d-learn mailing list