[dmd-concurrency] synchronized, shared, and regular methods inside the same class

Jason House jason.james.house at gmail.com
Mon Jan 4 08:21:22 PST 2010


On Jan 4, 2010, at 9:46 AM, Andrei Alexandrescu <andrei at erdani.com>  
wrote:

> This may be easiest to answer for people with extensive experience  
> with Java's threading model. Consider the following D code:
>
> class A {
>    void foo() synchronized;
>    void bar() shared;
>    void baz();
> }
>
> If we have an object of type A, all three methods are callable.

In dmd 2.037, that was not true. Bugzilla 3642 (on diagnostic message)  
shows sample code where calling A.bar fails on objects of type A.


More information about the dmd-concurrency mailing list