# | Line 93 | Line 93 | public final class LockLoops { | |
---|---|---|
93 | System.out.print("ReentrantReadWriteLock"); | |
94 | new ReentrantReadWriteLockLoop().test(v, nthreads, iters); | |
95 | Thread.sleep(10); | |
96 | – | |
96 | } | |
97 | ||
98 | if (doSemaphore) { | |
# | Line 106 | Line 105 | public final class LockLoops { | |
105 | System.out.print("FairSemaphore "); | |
106 | new FairSemaphoreLoop().test(v, nthreads, iters); | |
107 | Thread.sleep(10); | |
109 | – | |
108 | } | |
109 | ||
110 | if (doFair) { | |
# | Line 126 | Line 124 | public final class LockLoops { | |
124 | new FairReentrantReadWriteLockLoop().test(v, nthreads, iters); | |
125 | Thread.sleep(10); | |
126 | } | |
129 | – | |
127 | } | |
131 | – | |
128 | } | |
129 | ||
130 | abstract static class LockLoop implements Runnable { |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |