From: Tony Arcieri Date: 2012-08-29T04:41:33+09:00 Subject: Re: force child threads run paralelly? --f46d043c0962fd6cc904c858a0f2 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Aug 28, 2012 at 9:11 AM, Andriy Andreyev wrote: > Sorry for jumping in, but Tony, can you please explain what the idea is > behind having Threads implemented and not allowing them to be executed in > parallel? Thanks in advance. > By mapping Ruby Threads onto native threads, several threads can be executing system calls in parallel. When a thread wants to do a system call in 1.9, it can explicitly release the GIL and allow other threads to run. The previous version of MRI used green threads and had lots of slowness surrounding I/O due to the fact that it could only make one system call at a time. This was also a huge issue for things like database drivers. -- Tony Arcieri --f46d043c0962fd6cc904c858a0f2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Tue, Aug 28, 2012 at 9:11 AM, Andriy Andreyev= <andreev00@gmail.com> wrote:
Sorry for jumping= in, but Tony, can you please explain what the idea is behind having Thread= s implemented and not allowing them to be executed in parallel? Thanks in a= dvance.

By mapping Ruby Threads onto native threa= ds, several threads can be executing system calls in parallel. When a threa= d wants to do a system call in 1.9, it can explicitly release the GIL and a= llow other threads to run.

The previous version of MRI used green threads and had lots = of slowness surrounding I/O due to the fact that it could only make one sys= tem call at a time. This was also a huge issue for things like database dri= vers.

--
Tony Arcieri

--f46d043c0962fd6cc904c858a0f2--