Hi,
In message "[ruby-talk:9831] Ruby threads implementation - I/O Blocking? Interpreter / PCodes?"
on 01/01/25, "Gaston Fong" <gastonfong / yahoo.com> writes:
|I browsed through the ruby source code. It seems that Ruby manages threads
|on its own with the setjmp longjmp stuff.
|Doesn't that imply that I/O operations are blocking on all the Ruby threads
|at once?
No, at least Ruby level. All IO operations are checked to avoid
blocking. Although you can block everything by using C extension.
|I have also seen that the interpreter actually executes an evaluation tree
|instead of PCodes. I have not yet written a single line of code in Ruby, so
|I do not know wether there are constructs in the language which would imped
|the use of a "classic" bytecode machine. My guess is that the compiler would
|be much more complex ?
|Would there by any performance gains to expect?
I'm working on it. But It may take time to appear before you.
matz.