Development With D / FAQ /
Shared
Difference (last change) (no other diffs, normal page display)
Changed: 1c1,47
Describe the new page here. |
Other FAQs: * Official FAQ ![]() ![]() * ![]() * [[link]General Development[url= ![]() * [[link]DMD Complier[url= ![]() * [[link]Porting [url= ![]() * Error Messages [[toc]] -- ![]() = Shared FAQ = == Is Shared fully implemented? = No. == What guarantees is shared supposed to provide? = 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. == What does shared have to do with synchronization? = Only shared data can be synchronized. It makes no sense to synchronize thread local data. == What does shared have to do with memory barriers? = Reading/writing shared data emits memory barriers to ensure sequential consistency (not implemented). == What are the semantics of casting FROM unshared TO shared? = You'd better be sure there are no other unshared references to that same data. == What are the semantics of casting FROM shared TO unshared? = You'd better be sure there are no other shared references to that same data. == Why doesn't shared appear anywhere in core.thread? = Because nobody has spent the effort to do it. |
Other FAQs:
- Official FAQ
D 1.x,
D 2.x (Alpha) DocComments/FAQ
MKoD FAQ
- General Development
- DMD Complier
- Porting
- Error Messages
-- Concurrency architecture for D2
Shared FAQ
Is Shared fully implemented?
No.
What guarantees is shared supposed to provide?
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.
What does shared have to do with synchronization?
Only shared data can be synchronized. It makes no sense to synchronize thread local data.
What does shared have to do with memory barriers?
Reading/writing shared data emits memory barriers to ensure sequential consistency (not implemented).
What are the semantics of casting FROM unshared TO shared?
You'd better be sure there are no other unshared references to that same data.
What are the semantics of casting FROM shared TO unshared?
You'd better be sure there are no other shared references to that same data.
Why doesn't shared appear anywhere in core.thread?
Because nobody has spent the effort to do it.