synchronized { }

torhu no at spam.invalid
Fri Jun 27 07:37:42 PDT 2008


Steven Schveighoffer wrote:
> In any case, Tango avoids needing this statement by making mutexes fully 
> accessible objects.  If you need a mutex without having it attached to an 
> object, it's easy:
> 
> Mutex m = new Mutex;
> 
> synchronized(m)
> {
> }


Isn't that the same as doing this?

---
Object m = new Object;

synchronized(m)
{
}
---



More information about the Digitalmars-d mailing list