Synchronize Class fields between different threads

rikki cattermole rikki at cattermole.co.nz
Fri Nov 10 13:50:56 UTC 2017


Remember this bit: Everything on the heap, is not thread-local, it is 
global. This includes everything inside a class.

When you synchronize (statement) it is locking and then unlocking a 
mutex. A class has a mutex, simple! It only prevent multiple threads 
modifying a single thing at specific times, thats all.


More information about the Digitalmars-d-learn mailing list