Code example for ConcurrentLinkedQueue

Methods: poll

0
            if(_count.get() > 0)
            { 
                ReadWriteRunnable job = _writeJobQueue.poll();
                if(job == null)
                { 
                    job = _readJobQueue.poll();
                } 
                _count.decrementAndGet();
                return job;
            } 
            else 
            { 
                return null; 
            } 
        } 
        finally 
        { 
            takeLock.unlock();
        } 
 
    }