Optional monitors suggestion

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 16 12:13:03 PDT 2014


On Tue, 16 Sep 2014 15:01:17 -0400, Sean Kelly <sean at invisibleduck.org>  
wrote:

> Yeah I haven't looked at the implementation yet either.
> Currently, it's possible to set a core.sync.Mutex as an object
> monitor.  Would this capability be preserved?  Someone mentioned
> a hashtable of monitors... do we really need this?  I can see the
> desire to preserve existing semantics and so a user shouldn't
> have to explicitly construct a monitor to use synchronized since
> they don't today, but it should still be possible to do so if the
> user has some need to.

I would assume you couldn't unless the class is marked @monitor. I don't  
see a problem with this. The proposed migration path starts with all  
objects being marked with @monitor.

-Steve


More information about the Digitalmars-d mailing list