digitalmars.D.learn - Questions about shared
- weltensturm (8/8) Mar 12 2013 First off, is the implementation of 'shared' finished, and if not
- John Colvin (5/9) Mar 12 2013 Because there are no guarantees about what the library function
First off, is the implementation of 'shared' finished, and if not how long roughly will it take until it's done? If a whole class is declared shared, is it intended that each variable of it has to be defined shared too? 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.
Mar 12 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.
Mar 12 2013