Hi,

> If you use an exception, you have to care it yourself, such as,
> by adding rescue clause:
>
>  a = Thread.start do
>    mutex.synchronize do
>      ...
>      exc = nil
>      until enc || (... "your condition" ...)
>        begin
>          cv.wait(mutex)
>        rescue Exception
>          exc = $!
>        end
>      end
>      raise exc if exc
>      ...
>    end
>  end


Sorry, I realized even this code does not work correctly.
Thread 'a' may be left in @waiters after the until loop.
Multi-thread programming is very difficult for me :-(

-- 
Yusuke Endoh <mame / tsg.ne.jp>