ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/SynchronousQueueTest.java
(Generate patch)

Comparing jsr166/src/test/tck/SynchronousQueueTest.java (file contents):
Revision 1.26 by jsr166, Sat Oct 9 19:30:35 2010 UTC vs.
Revision 1.27 by jsr166, Thu Oct 28 17:57:26 2010 UTC

# Line 218 | Line 218 | public class SynchronousQueueTest extend
218          t.join();
219      }
220  
221
222    /**
223     * take blocks interruptibly when empty
224     */
225    public void testTakeFromEmpty() throws InterruptedException {
226        final SynchronousQueue q = new SynchronousQueue();
227        Thread t = new Thread(new CheckedInterruptedRunnable() {
228            public void realRun() throws InterruptedException {
229                q.take();
230            }});
231
232        t.start();
233        Thread.sleep(SHORT_DELAY_MS);
234        t.interrupt();
235        t.join();
236    }
237
238
221      /**
222       * put blocks interruptibly if no active taker
223       */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines