# | Line 52 | Line 52 | public final class CheckedLockLoops { | |
---|---|---|
52 | } | |
53 | ||
54 | static void oneTest(int nthreads, int iters) throws Exception { | |
55 | < | int fairIters = (nthreads <= 1)? iters : iters/20; |
55 | > | int fairIters = (nthreads <= 1) ? iters : iters/20; |
56 | int v = rng.next(); | |
57 | ||
58 | if (print) | |
# | Line 197 | Line 197 | public final class CheckedLockLoops { | |
197 | int sum = 0; | |
198 | int x = 0; | |
199 | while (n-- > 0) { | |
200 | < | synchronized(this) { |
200 | > | synchronized (this) { |
201 | x = setValue(LoopHelpers.compute1(getValue())); | |
202 | } | |
203 | sum += LoopHelpers.compute2(x); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |