Questions about shared
John Colvin
john.loughran.colvin at gmail.com
Tue Mar 12 08:43:20 PDT 2013
On Tuesday, 12 March 2013 at 12:11:58 UTC, weltensturm wrote:
> Why isn't it allowed to implicitly cast shared data to normal
> data, or will that be part of the final implementation? It's a
> bit annoying to cast everything back when using external
> libraries.
Because there are no guarantees about what the library function
will do with the object. It ensures that you don't accidentally
pass a shared object to a function that doesn't think about
thread-safety.
More information about the Digitalmars-d-learn
mailing list