IntelliJ Java IDE
The moose likes Threads and Synchronization and the fly likes Yes! Finally in JDK 1.4... Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "Yes! Finally in JDK 1.4..." Watch "Yes! Finally in JDK 1.4..." New topic
Author

Yes! Finally in JDK 1.4...

Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
... A facility to find out if you've got a lock on something:This is going to very useful in combination with assertions:Unfortunately, still no way to check whether another Thread holds a lock on an object
- Peter
Mr. C Lamont Gilbert
Ranch Hand

Joined: Oct 05, 2001
Posts: 1158

Its a static function?
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Originally posted by CL Gilbert:
Its a static function?
It is, and it implicitly operates on the current thread. There is no way to see if another thread holds a monitor lock.
- Peter
 
 
subject: Yes! Finally in JDK 1.4...
 
Threads others viewed
Livelock same as race condition?
Synchornized inside run
Wait question from K&B threads chapter
Threads & Locks Q from W.Brogden's Exam Cram
Questions about locks
MyEclipse, The Clear Choice