That the mutex is allocated in the same object that contains the variable(s) it protects. E.g.
synchronized mapping foo;
would allocation-wise be similar to
Thread.Mutex foo_mutex; mapping foo;
Note that it's the variable foo itself that's the principal point of the mutex protection, not its value. One advantage with that is that it's possible to protect simple types like integers and strings where it would be meaningless to associate a mutex with the value.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-02-06 03:51: Subject: synchronized
No, that's one place where it definitely can't be. I'd like them to be allocated next to the variables that need locking, even though that
Huh? Allocated "next to the variables"? What do you mean with that?
/ David Hedbor