Code example for ArrayBlockingQueue

Methods: put

0
    } 
 
    @Threaded 
    public void threadPutPut() throws InterruptedException 
    { 
        buf.put(42);
        buf.put(17);
        assertTick(1); 
    } 
 
    @Threaded 
    public void threadTakeTake() throws InterruptedException 
    { 
        waitForTick(1); 
        assertTrue(buf.take() == 42);
        assertTrue(buf.take() == 17);
    } 
 
    @Test 
    public void finish() 
    {