object sync monitor ref

bearophile bearophileHUGS at lycos.com
Thu Nov 7 03:04:04 PST 2013


Pavel:

> Why don't to introduce some annotation (property) for class 
> needed to be synchronized or it descendants, according to it 
> compiler will extend the size of class by the size of monitor 
> structure (+1 allocation less).
> Synchronization will be allowed when class or supers is 
> annotated with this property (it can be checked by compiler).

Out there there is surely some D code that lacks your annotations 
and relies on the presence of the monitor pointer in some class 
instances. I think your change is going to break that code. So 
what deprecation/update path do you suggest to use?

Bye,
bearophile


More information about the Digitalmars-d mailing list