1 // Test that Thread.holdsLock() works.
5 public class Thread_HoldsLock
7 static Lock lock = new Lock();
9 public static void main(String args[]) throws InterruptedException
11 Thread_HoldsLock thl = new Thread_HoldsLock();
23 Thread this_thread = Thread.currentThread();
24 System.out.println(this_thread.holdsLock(lock));