Tuesday, February 1, 2011

Java: How to check if a thread holds lock on a particular object

Call Thread::holdsLock(Object) to find out, whether a thread holds a lock on an object.

How to check if a thread holds lock on a particula...: "Think about a scenario where you would have to find at run time that whether a thread has lock on a particular object e.g. find out whether ..."