synchronized { }

Sean Kelly sean at invisibleduck.org
Mon Jun 30 14:01:59 PDT 2008


== Quote from janderson (askme at me.com)'s article
> Walter Bright wrote:
> > Right now, if you use a synchronized statement with no argument, it will
> > sync on a mutex unique to that statement.
> >
> > Does anyone write threading code that depends on this behavior?
> Slightly off topic.
> Just a thought.  If we had the ability to do block operators, or turn
> functions with delegates into blocks, or any other incarnation we could
> have this as a library function.

It is already effectively a library function in Tango.  Tango contains mutexes
which may operate as object monitors and there is no real code dependency
for this between the runtime and library code.


Sean



More information about the Digitalmars-d mailing list