q = Queue.new q << :data q.pop #=> :data
#pop
will block until there is some data available.
#pop
can be used for synchronization.