Last update January 9, 2010

Development With D / FAQ /
Shared



Other FAQs:
Table of contents of this page
Shared FAQ   
Is Shared fully implemented?   
What guarantees is shared supposed to provide?   
What does shared have to do with synchronization?   
What does shared have to do with memory barriers?   
What are the semantics of casting FROM unshared TO shared?   
What are the semantics of casting FROM shared TO unshared?   
Why doesn't shared appear anywhere in core.thread?   

-- 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.

FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: January 9, 2010 19:03 (diff))