Code example for SynchronousQueue

Methods: poll

0
        } 
    } 
 
    private void suspend(String s) throws InterruptedException
    { 
        String event = m_eventQueue.poll(10, TimeUnit.SECONDS);
        if (event == null)
        { 
            fail("timeout for \"" + s + "\"");
        } 
        assertEquals(s, event);
    } 
 
    private void resume() 
    { 
        assertEquals(0, m_semaphore.availablePermits());
        m_semaphore.release();
    } 
 
    private void pass(String... events) throws InterruptedException
Contextual code suggestions in your IDE  Get Codota for Java