From: Brian Candler Date: 2008-09-22T19:15:33+09:00 Subject: Re: ThreadError: not owner Thomas B. wrote: > m=Mutex::new > m.lock > Thread:new\ > { > # something1 > m.unlock > # something2 > } > m.synchronize{} > > The main thread was supposed to create a new thread, and then wait for > this thread to complete executing something1. Hmm, so you just need some way for the thread to signal that it has finished something1? I'd suggest q = Queue.new Thread.new do # something1 q.push(:dummy) # something2 end q.pop The semantics of a queue are very easy to understand :-) -- Posted via http://www.ruby-forum.com/.