On Wed, Jul 4, 2012 at 1:45 PM, rex goxman <lists / ruby-forum.com> wrote:

@jacques1 and fxn above:
>
> Are you saying that green threads are used regardless of what is
> happening with kernel threads and the GIL?  The thread posted by fxn
> seems to indicate this.


I don't know enough to give a definitive answer (or plainly put, to
answer), but here's my interpretation of the post:

I believe the green threads in Ilya's post are the Ruby-land thread
objects, they are not necessarily green in the sense of who is doing the
scheduling. This is my interpretation a posteriori because of the way the
JVM is drawn.

They are definitely green threads in MRI 1.8 in the sense that MRI did
scheduling (you already know that).

Then, behind the scenes, they are mapped to native threads in MRI 1.9 and
JRuby. One-to-one. In the case of MRI there's a GIL. I guess technically a
GIL does not mean that MRI is doing the scheduling, it means MRI is holding
a lock, but the kernel schedules the native thread (because it is native).
Maybe there's a gray area in the definition of green thread here, I don't
know.

That is my interpretation, but I don't know enough to be certain. Please
someone correct me if that is wrong!