Hi,

2010/5/5 Sylvain Joyeux <redmine / ruby-lang.org>:
> Ruby allows condition variables to be interrupted by exceptions, and it s=
hould therefore *work when it is used*. It is a grave bug, as it will lead =
to weird, hard-to-debug situations for people that use Ruby normal features=
 (exception handling and multi-threading).

Umm, Okay.  I'll accept your fix unless there is objection.

But, you should *not* use Thread#raise if you are serious about multi-
thread programming.  It has a potential race condition:

  1) an exception is raised by another thread
  2) rescue/ensure clause is going to be executed
  3) another exception is raised by another thread
  4) rescue/ensure clause are not executed

An exception raised by another thread cannot be handled safely.


> I'm really getting tired of having to deal with multi-threading issues wi=
th Ruby.

I understand your irrits, but in fact, Ruby's thread is very immature
in a sense of both design and implementation.  This is unfortunate, but
the fact.


> If MT is so low-priority in the MRI world, maybe you guys should remove i=
t completely from the interpreter.

I think it is good idea, with no apparent sense of irony, though
it is of course impossible.


> you would have to rewrite the whole of the MRI multi-threading implementa=
tion.

I think so, honestly.
We need contribution from those who are familiar with multi-thread
programing.

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