jdk/test/java/util/concurrent/locks/ReentrantLock/CancelledLockLoops.java
changeset 4110 ac033ba6ede4
parent 2 90ce3da70b43
child 4347 ab0a9f495844
equal deleted inserted replaced
4109:b997a0a1005d 4110:ac033ba6ede4
   113                 c = completed;
   113                 c = completed;
   114             }
   114             }
   115             finally {
   115             finally {
   116                 lock.unlock();
   116                 lock.unlock();
   117             }
   117             }
   118             if (completed != 2)
   118             if (c != 2)
   119                 throw new Error("Completed != 2");
   119                 throw new Error("Completed != 2");
   120             int r = result;
   120             int r = result;
   121             if (r == 0) // avoid overoptimization
   121             if (r == 0) // avoid overoptimization
   122                 System.out.println("useless result: " + r);
   122                 System.out.println("useless result: " + r);
   123         }
   123         }