class Concurrent::WaitableList

def take

def take
  @mutex.synchronize do
    @condition.wait(@mutex) while @list.empty?
    @list.shift
  end
end