*/
    public Runnable poll(long timeout, TimeUnit unit) throws InterruptedException
    {
        lock.lockInterruptibly();
        try {
            long nanos = unit.toNanos(timeout);
            while(true) {                
                if(queue.remainingCapacity() > 0) {
                    ChannelsRunnable availableRunnable = getAvailableRunnable();
                    if(availableRunnable != null)
                        return availableRunnable;
                }
                
                if (nanos <= 0)
                    return null;
                try {
                    nanos = hasAvailableRunnable.awaitNanos(nanos);
                } catch (InterruptedException ie) {
                    hasAvailableRunnable.signal(); // propagate to non-interrupted thread
                    throw ie;
                }
            }
        } finally {
            lock.unlock();
        }        
    }