From: Xavier Noria Date: 2012-07-04T21:41:08+09:00 Subject: Re: Green threads in 1.9.* ? --047d7b33cf6c283b4704c40058f1 Content-Type: text/plain; charset=UTF-8 On Wed, Jul 4, 2012 at 2:30 PM, Peter Zotov wrote: Ruby 1.9 uses kernel threads and does not have green threads. > There is nothing like Erlang's lightweight processes in Ruby (or, for > that matter, in most of the languages). That is clear, but the definition of green thread depends on who schedules them. Is the GIL acting as a scheduler? Has MRI logic about what to lock next therefore scheduling in practice *among the threads in its process*? Or is my conjecture right that locking is mostly dumb and that ultimately the kernel is the scheduler because the thread is native? --047d7b33cf6c283b4704c40058f1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Jul 4, 2012 at 2:30 PM, Peter Zotov <whitequark@whitequa= rk.org> wrote:

Ruby 1.9 uses kernel threads and does not have green threads.
There is nothing like Erlang's lightweight processes in Ruby (or, for that matter, in most of the languages).

Tha= t is clear, but the definition of green thread depends on who schedules the= m.

Is the GIL acting as a scheduler? Has MRI logic= about what to lock next therefore scheduling in practice *among the thread= s in its process*? Or is my conjecture right that locking is mostly dumb an= d that ultimately the kernel is the scheduler because the thread is native?=
--047d7b33cf6c283b4704c40058f1--