From: Robert Klemme Date: 2011-05-13T23:28:39+09:00 Subject: Re: help on threads synchronization On Fri, May 13, 2011 at 2:48 PM, Zd Yu wrote: > Thanks Robert and Jake. I must use threads. Why? > Actually my original problem > is much more complicated and I just simplified it to ask in this forum. Then apparently you did not abstract the problem properly. Before we jump to solutions can you explain why you say you must use threads? What is the real problem you are trying to solve? > I just found the ConditionVariable class, and it seems it is the key to > implement such cooperation between threads. > > Please help review my code below. Let me know if I did anything wrong. The whole approach is too complicated for the problem to be solved (see above). Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/