6908348: java/util/concurrent/BlockingQueue/CancelledProducerConsumerLoops.java get OOME for unbounded queues

Reviewed-by: martin, dholmes
This commit is contained in:
Doug Lea 2009-12-23 15:57:14 -08:00
parent 071aabe3f8
commit dc8d9d049e

View File

@ -146,13 +146,13 @@ public class CancelledProducerConsumerLoops {
oneRun(new ArrayBlockingQueue<Integer>(CAPACITY), pairs, iters);
oneRun(new LinkedBlockingQueue<Integer>(CAPACITY), pairs, iters);
oneRun(new LinkedBlockingDeque<Integer>(CAPACITY), pairs, iters);
oneRun(new SynchronousQueue<Integer>(), pairs, iters / 8);
/* TODO: unbounded queue implementations are prone to OOME
oneRun(new PriorityBlockingQueue<Integer>(iters / 2 * pairs), pairs, iters / 4);
oneRun(new LinkedTransferQueue<Integer>(), pairs, iters);
oneRun(new LTQasSQ<Integer>(), pairs, iters);
oneRun(new HalfSyncLTQ<Integer>(), pairs, iters);
oneRun(new SynchronousQueue<Integer>(), pairs, iters / 8);
/* PriorityBlockingQueue is unbounded
oneRun(new PriorityBlockingQueue<Integer>(iters / 2 * pairs), pairs, iters / 4);
*/
}