Sharing in D

Jason House jason.james.house at gmail.com
Fri Aug 1 06:15:30 PDT 2008


Walter Bright Wrote:
 
> Unshared can be implicitly cast to shared, so you shouldn't have to.

That should not be implicit. 

For one, thread-local garbage collection of non-shared data would leave dangling references to garbage memory. 

Two, the guarantees for shared data are lost. Code using the non-shared reference will not respect that the variable really is shared.



More information about the Digitalmars-d mailing list