Forum: Ruby Ruby 2.0 Thread multitasking?

A665665c83ac8d18e9f36083db34e971?d=identicon&s=25 Charles Hixson (charlesh)
on 2013-03-13 01:08
(4th attempt at posting:  The prior 3 attempts were posts to the
ruby-talk@ruby-lang.org 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?
A74a68807619459925cc1d8e1045c7bd?d=identicon&s=25 Tony Arcieri (Guest)
on 2013-03-13 01:23
(Received via mailing list)
On Tue, Mar 12, 2013 at 5:09 PM, Charles Hixson
<lists@ruby-forum.com>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"
Adf7d4a2a49161a48ca1863a49f8af37?d=identicon&s=25 Carlos Agarie (Guest)
on 2013-03-13 01:53
(Received via mailing list)
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 Agarie
Skype: carlos.agarie

Control engineering
Polytechnic School, University of So Paulo, Brazil
Computer engineering
Embry-Riddle Aeronautical University, USA


2013/3/12 Charles Hixson <lists@ruby-forum.com>
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.