Hi,

At Thu, 05 Oct 2000 01:23:19 +0900,
Shugo Maeda <shugo / ruby-lang.org> wrote:
> You can wait multiple conditions for one mutex.
> 
> class YASizedQueue < YAQueue
(snip)
>   def enq(obj)
>     @mutex.synchronize do
>       while @que.length >= @max
>         @full_cond.wait(@mutex)
>       end
>       super(obj)
>     end
>   end

Sorry, Mutex is not re-entrant. (So this program cause dead-lock.)
Please use Monitor instead of Mutex.

Shugo