7778798081828384858687
for (int i = 0; i < 1000; i++) { queue.add(new TestTask("tratatatat")); } for (int i = 0; i < 1000; i++) { Object obj = queue.poll(); assertNotNull(obj); } assertNull(queue.poll()); } finally {
8182838485868788899091
for (int i = 0; i < 1000; i++) { Object obj = queue.poll(); assertNotNull(obj); } assertNull(queue.poll()); } finally { queue.dispose(); } }