23 |
|
static final LoopHelpers.SimpleRandom rng = new LoopHelpers.SimpleRandom(); |
24 |
|
static boolean print = false; |
25 |
|
static final int ITERS = Integer.MAX_VALUE; |
26 |
< |
static final long TIMEOUT = 100; |
26 |
> |
static final long TIMEOUT = 100; |
27 |
|
|
28 |
|
public static void main(String[] args) throws Exception { |
29 |
|
int maxThreads = 100; |
30 |
< |
if (args.length > 0) |
30 |
> |
if (args.length > 0) |
31 |
|
maxThreads = Integer.parseInt(args[0]); |
32 |
|
|
33 |
|
print = true; |
79 |
|
|
80 |
|
public final void run() { |
81 |
|
try { |
82 |
< |
barrier.await(); |
82 |
> |
barrier.await(); |
83 |
|
int sum = v; |
84 |
|
int x = 17; |
85 |
|
int n = ITERS; |
104 |
|
barrier.await(); |
105 |
|
result += sum; |
106 |
|
} |
107 |
< |
catch (Exception ex) { |
107 |
> |
catch (Exception ex) { |
108 |
|
ex.printStackTrace(); |
109 |
< |
return; |
109 |
> |
return; |
110 |
|
} |
111 |
|
} |
112 |
|
} |