------ art_80628_27371839.1188092630556 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 8/25/07, Joel VanderWerf <vjoel / path.berkeley.edu> wrote: > > M. Edward (Ed) Borasky wrote: > > Well ... I think we should have *both* green threads (i.e., a built-in > > thread scheduler in a single Ruby process) and native threads (i.e., the > > Linux "clone" operation creating a separate lightweight process sharing > > a memory space). > > Did the recent discussion of fibers lead to the conclusion that green > threads would still exist in some form in 1.9? Will we be able to > experiment with 1:N and M:N threading in pure ruby? > > -- > vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 > > There's nothing wrong with experimentation, but there are good reasons why the Linux kernel people moved away from the M:N model. The Sun threading model is still M:N because it has been for a dozen years, but they changed the default threading discipline to "pre-emptive" years ago because life is just so much easier that way. From a programmer's perspective, Solaris threads might as well be 1:N. (More precisely, it's an exceedingly rare program that can benefit from direct dependence on the M:N model.) Non-preemptive threads seem like a wonderful idea because they're so lightweight. Having done it both ways, I can tell you that the big problem with non-preemptive threads is the bugs you get when they don't get scheduled at the right times. I think something like Erlang processes will be far easier to work with, and they're every bit as lightweight. ------ art_80628_27371839.1188092630556--