Something needs to happen with shared, and soon.

deadalnix deadalnix at gmail.com
Mon Nov 12 08:14:32 PST 2012


Le 12/11/2012 16:00, luka8088 a écrit :
> If I understood correctly there is no reason why this should not compile ?
>
> import core.sync.mutex;
>
> class MyClass {
> void method () {}
> }
>
> void main () {
> auto myObject = new shared(MyClass);
> synchronized (myObject) {
> myObject.method();
> }
> }
>

D has no ownership, so the compiler can't know what
if it is safe to do so or not.


More information about the Digitalmars-d mailing list