We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2d20be commit 01dfc04Copy full SHA for 01dfc04
src/com/winterbe/java8/samples/concurrent/Lock5.java
@@ -20,6 +20,8 @@ public static void main(String[] args) {
20
System.out.println("Optimistic Lock Valid: " + lock.validate(stamp));
21
ConcurrentUtils.sleep(1);
22
23
+ ConcurrentUtils.sleep(2);
24
+ System.out.println("Optimistic Lock Valid: " + lock.validate(stamp));
25
} finally {
26
lock.unlock(stamp);
27
}
0 commit comments