(4th attempt at posting: The prior 3 attempts were posts to the
[email protected] mailing
list … which certainly used to work.)
Does Ruby 2.0 run more than one thread at a time? The documentation I
have says that Ruby 1.9 does not.
From what I’ve read I’m presuming the answer is no, so are there any
plans to remove this limitation?
On Tue, Mar 12, 2013 at 5:09 PM, Charles H.
[email protected]wrote:
Does Ruby 2.0 run more than one thread at a time? The documentation I
have says that Ruby 1.9 does not.
You’re talking about the Global Interpreter Lock or GIL (also known as
the
Global VM Lock, or GVL)
The answer is no, Ruby 2.0 does not remove the GIL, and there are not
plans
to remove it at this time. Note that this lock does not preclude you
from
carrying out I/O-related tasks in parallel. It only limits multicore
operation (i.e. multiple cores running Ruby code)
That said, JRuby, Rubinius, and other Ruby VMs provide true thread-level
parallelism via GIL-free operation and are “multicore-aware”
This limitation doesn’t exist in JRuby (I’m not sure about the other
implementations).
I imagine that the guys from MRI team want to remove the Global
Interpreter/VM lock, but from what I’ve read it isn’t something trivial.
I’d love to be able to help, but I don’t know enough (yet).
Carlos A.
Skype: carlos.agarie
Control engineering
Polytechnic School, University of So Paulo, Brazil
Computer engineering
Embry-Riddle Aeronautical University, USA
2013/3/12 Charles H. [email protected]