RefCounted no thread-safety?

Kira Backes kira.backes at nrwsoft.de
Sun Jan 12 11:59:55 PST 2014


Hello,


I was just looking at the source of std.typecons.RefCounted and 
it seems like it is not thread-safe at all, the count variable 
may be written concurrently from several threads which could 
cause data corruption. Is this correct or am I overlooking 
something (I’m still new to D). If it is correct then this should 
either be fixed or if it is intentional it should really be 
documented.


rgds, Kira


More information about the Digitalmars-d mailing list