From: Peter Zotov Date: 2012-07-04T21:45:14+09:00 Subject: Re: Green threads in 1.9.* ? Xavier Noria писал 04.07.2012 16:41: > 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? The OP's problem is not the scheduler itself but the associated system resources. You can create 20k Erlang processes ("threads"). You cannot create 20k pthreads. Just that. -- WBR, Peter Zotov.