From: "Thomas B." Date: 2008-09-22T18:15:40+09:00 Subject: Re: ThreadError: not owner Thomas B. wrote: > But there is a problem with the example code you provided, > because you do not ensure that the main thread enters the wait state > before the semaphore is signalled. I'm sorry, my mistake. It will work no matter which happens first, as the semaphore stays signalled even if no thread is currently waiting. My first glance at the code reported otherwise. The case I described is really a problem only when using my strange construction with mutex or sleep. TPR. -- Posted via http://www.ruby-forum.com/.