def pop(non_block=false)
      if @close
        return empty? ? nil : @queue.pop
      end
      if empty?
        if non_block
          raise ThreadError, 'queue empty'
        else
          future = LightIO::Future.new
          @waiters << future
          future.value
        end
      else
        @queue.pop
      end
    end
def pop(non_block=false)
      if @close
        return empty? ? nil : @queue.pop
      end
      if empty?
        if non_block
          raise ThreadError, 'queue empty'
        else
          future = LightIO::Future.new
          @waiters << future
          future.value
        end
      else
        @queue.pop
      end
    end
pop(non_block=false)
 deq(non_block=false)
 shift(non_block=false)

 Retrieves data from the queue.

 If the queue is empty, the calling thread is suspended until data is pushed
 onto the queue. If +non_block+ is true, the thread isn't suspended, and an
 exception is raised.