From: Brian Candler Date: 2008-09-22T19:58:47+09:00 Subject: Re: ThreadError: not owner Thomas B. wrote: > Brian Candler wrote: >> q = Queue.new >> Thread.new do >> # something1 >> q.push(:dummy) >> # something2 >> end >> q.pop > > Thanks! That seems to be a good solution. > > The name Queue is a bit confusing... That's what it is - a first-in, first-out queue. However it is nicely thread-safe, and the 'pop' operation blocks until there is something to retrieve, which is what you need here. -- Posted via http://www.ruby-forum.com/.