7 |
|
* A simple test program. Feel free to play. |
8 |
|
*/ |
9 |
|
|
10 |
+ |
import java.util.*; |
11 |
|
import java.util.concurrent.*; |
12 |
|
import java.util.concurrent.locks.*; |
12 |
– |
import java.util.*; |
13 |
|
|
14 |
|
public final class LockLoops { |
15 |
|
static final ExecutorService pool = Executors.newCachedThreadPool(); |
18 |
|
static boolean doBuiltin = true; |
19 |
|
static boolean doReadWrite = true; |
20 |
|
static boolean doSemaphore = true; |
21 |
< |
static boolean doFair = true; |
21 |
> |
static boolean doFair = true; |
22 |
|
|
23 |
|
public static void main(String[] args) throws Exception { |
24 |
|
int maxThreads = 100; |