Synchronized classes have no public members

Benjamin Thaut via Digitalmars-d digitalmars-d at puremagic.com
Tue Oct 13 05:51:13 PDT 2015


On Tuesday, 13 October 2015 at 12:20:17 UTC, Minas Mina wrote:
>
> I agree that synchronized classes / functions that not that 
> useful.
>
> But synchronized statements, to me, make the intention of 
> locking explicit.

Synchronized statements are fine and serve a good purpose, no 
need to delete them in my opinion.

>
> Maybe the internal monitor could be removed (with synchronized 
> classes / functions as well), and allow synchronized() {} to be 
> called on Lock objects, that essentially locks them at the 
> beginning and unlocks them at the end.

Yes, I would love that.


More information about the Digitalmars-d mailing list