1 |
|
/* |
2 |
|
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
|
* Expert Group and released to the public domain, as explained at |
4 |
< |
* http://creativecommons.org/licenses/publicdomain |
4 |
> |
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
*/ |
6 |
|
|
7 |
< |
import java.util.concurrent.*; |
8 |
< |
import java.util.concurrent.locks.*; |
9 |
< |
import java.util.*; |
7 |
> |
import java.util.Arrays; |
8 |
> |
import java.util.Collections; |
9 |
> |
import java.util.Random; |
10 |
> |
import java.util.concurrent.BrokenBarrierException; |
11 |
> |
import java.util.concurrent.CyclicBarrier; |
12 |
> |
import java.util.concurrent.ExecutorService; |
13 |
> |
import java.util.concurrent.Executors; |
14 |
> |
import java.util.concurrent.locks.ReentrantLock; |
15 |
|
|
16 |
|
public final class CancelledLockLoops { |
17 |
|
static final Random rng = new Random(); |