Code example for SynchronousQueue

Methods: poll

0
            throw new TimeoutException("Failed to acquire request scheduler slot for '" + key + "'");
    } 
 
    public Thread poll()
    { 
        Entry e = queue.poll();
        if (e == null)
            return null; 
        stats.addNano(System.nanoTime() - e.creationTime);
        return e.thread;
    } 
 
    @Override 
    public String toString()
    { 
        return "RoundRobinScheduler.WeightedQueue(key=" + key + " weight=" + weight + ")";
    } 
 
    private final static class Entry 
    { 
Connect your IDE to all the code out there  Get Codota for Java