| Author |
lock, monitor, mutex, or semaphore?
|
John M. Gabriele
Ranch Hand
Joined: Feb 18, 2001
Posts: 232
|
|
i've heard these 4 words bandied about as if they were all synonyms. can someone please tell me what the differences between them are? when i go synchronized ( obj ) { /*...*/ } what am i actually "getting"? is it proper to say i'm getting "the lock belonging to obj" or "a lock on obj"? thanks!
|
 |
John M. Gabriele
Ranch Hand
Joined: Feb 18, 2001
Posts: 232
|
|
ok, i think i'm starting to get the picture here. ...btw, i didn't mean to imply that folks around the ranch were misusing terms; i guess i should've said i'm just confused about these various terms i've heard. sorry.  anyhow, i *think* mutex's and semaphores are low-level os/jvm things that i don't need to be concerned with at the java app level. the generic term "lock" seems to cover however the jvm does it's synchronizing magic. as for "getting a lock on/of/for an object" or "locking an object", they seem to all be equivalent to mean the same thing.
|
 |
 |
|
|
subject: lock, monitor, mutex, or semaphore?
|
|
|