1 |
|
/* |
2 |
|
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
< |
* Expert Group and released to the public domain. Use, modify, and |
4 |
< |
* redistribute this code in any way without acknowledgement. |
3 |
> |
* Expert Group and released to the public domain, as explained at |
4 |
> |
* http://creativecommons.org/licenses/publicdomain |
5 |
|
*/ |
6 |
|
|
7 |
|
import java.util.concurrent.*; |
49 |
|
} |
50 |
|
|
51 |
|
static void oneTest(int nThreads, int iters, boolean print) throws Exception { |
52 |
+ |
// if (print) System.out.print("LinkedBlockingQueue "); |
53 |
+ |
// oneRun(new LinkedBlockingQueue<Runnable>(256), nThreads, iters, print); |
54 |
+ |
// if (print) System.out.print("ArrayBlockingQueue "); |
55 |
+ |
// oneRun(new ArrayBlockingQueue<Runnable>(256), nThreads, iters, print); |
56 |
|
if (print) System.out.print("SynchronousQueue "); |
57 |
|
oneRun(new SynchronousQueue<Runnable>(false), nThreads, iters, print); |
58 |
|
if (print) System.out.print("SynchronousQueue(fair) "); |