From: Tony Arcieri Date: 2012-07-05T10:30:31+09:00 Subject: Re: Green threads in 1.9.* ? --0015175cfb2ec5bdf104c40b1752 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Jul 4, 2012 at 3:57 AM, rex goxman wrote: > I'd like to use green threads (NOT kernel threads) in a Ruby program I'm > writing. There is no reason for me to > use kernel threads, and every reason to use green ones. > If you want to use 1.9, you're out of luck. That said, you aren't stating your reasoning for why you would prefer green threads over native ones. Native threads have a longer creation time and use marginally more memory (they use ~20kB per thread last I measured), however they generally perform better, particularly around I/O. On platforms like Linux scheduling is O(1) so there's really no reason you can't create large numbers of threads. There are definitely many reasons to prefer native threads over green threads. This is the reason why you have seen a shift from green threads to native threads in MRI, Rubinius, and the JVM. Why do you want green threads? -- Tony Arcieri --0015175cfb2ec5bdf104c40b1752 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Wed, Jul 4, 2012 at 3:57 AM, rex goxman <= lists@ruby-forum.com> wrote: