equal
deleted
inserted
replaced
39 * @run main RemovePollRace 12345 |
39 * @run main RemovePollRace 12345 |
40 */ |
40 */ |
41 |
41 |
42 import java.util.concurrent.ArrayBlockingQueue; |
42 import java.util.concurrent.ArrayBlockingQueue; |
43 import java.util.concurrent.ConcurrentHashMap; |
43 import java.util.concurrent.ConcurrentHashMap; |
|
44 import java.util.concurrent.ConcurrentLinkedDeque; |
44 import java.util.concurrent.ConcurrentLinkedQueue; |
45 import java.util.concurrent.ConcurrentLinkedQueue; |
45 import java.util.concurrent.CountDownLatch; |
46 import java.util.concurrent.CountDownLatch; |
46 import java.util.concurrent.LinkedBlockingDeque; |
47 import java.util.concurrent.LinkedBlockingDeque; |
47 import java.util.concurrent.LinkedBlockingQueue; |
48 import java.util.concurrent.LinkedBlockingQueue; |
48 import java.util.concurrent.LinkedTransferQueue; |
49 import java.util.concurrent.LinkedTransferQueue; |
60 |
61 |
61 final Map<String,String> results = new ConcurrentHashMap<String,String>(); |
62 final Map<String,String> results = new ConcurrentHashMap<String,String>(); |
62 |
63 |
63 Collection<Queue<Boolean>> concurrentQueues() { |
64 Collection<Queue<Boolean>> concurrentQueues() { |
64 List<Queue<Boolean>> queues = new ArrayList<Queue<Boolean>>(); |
65 List<Queue<Boolean>> queues = new ArrayList<Queue<Boolean>>(); |
|
66 queues.add(new ConcurrentLinkedDeque<Boolean>()); |
65 queues.add(new ConcurrentLinkedQueue<Boolean>()); |
67 queues.add(new ConcurrentLinkedQueue<Boolean>()); |
66 queues.add(new ArrayBlockingQueue<Boolean>(count, false)); |
68 queues.add(new ArrayBlockingQueue<Boolean>(count, false)); |
67 queues.add(new ArrayBlockingQueue<Boolean>(count, true)); |
69 queues.add(new ArrayBlockingQueue<Boolean>(count, true)); |
68 queues.add(new LinkedBlockingQueue<Boolean>()); |
70 queues.add(new LinkedBlockingQueue<Boolean>()); |
69 queues.add(new LinkedBlockingDeque<Boolean>()); |
71 queues.add(new LinkedBlockingDeque<Boolean>()); |