Issue #3212 has been updated by Sylvain Joyeux.


Ruby allows condition variables to be interrupted by exceptions, and it should 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).

I'm really getting tired of having to deal with multi-threading issues with Ruby. If MT is so low-priority in the MRI world, maybe you guys should remove it completely from the interpreter. This situation where "might, might not work, don't know" is *really* bad and detrimental to Ruby's image. I already have a time hard enough to advocate the usage of ruby vs. Python (python is much more popular in the robotics field), that I would really prefer *not* having to explain to people that these low-level bugs are not even fixed.

The fix I proposed will cause a competition on the waiters mutex on wakeup. This has an effect only if the CV is *not* used in the context of an external mutex (which should never be the case). Moreover, it is a very low impact as there is very little operations done while taking this mutex (only modifications to @waiters). In the end, you could have priority inversions problems, but if you start being picky about those, you would have to rewrite the whole of the MRI multi-threading implementation.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/3212

----------------------------------------
http://redmine.ruby-lang.org