- Official FAQ D 1.x, D 2.x (Alpha) DocComments/FAQ
- MKoD FAQ
- General Development
- DMD Complier
- Error Messages
Shared means that multiple threads can access the data. The guarantee is that if it is not shared, and not immutable, that only the current thread can see it.
Only shared data can be synchronized. It makes no sense to synchronize thread local data.
Reading/writing shared data emits memory barriers to ensure sequential consistency (not implemented).
You'd better be sure there are no other unshared references to that same data.
You'd better be sure there are no other shared references to that same data.
Because nobody has spent the effort to do it.