Toby DiPasquale on 1 Oct 2007 11:22:17 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PhillyOnRails] fibers vs green threads


On Mon, Oct 01, 2007 at 02:37:38AM -0400, Evan Weaver wrote:
> Does the presence of fibers in Ruby 1.9 make up for the lack of green threads?
> 
> Green threading is cooperative based on blocking selects(), not
> explicit yields, so I would guess not, but maybe there's some way to
> automatically schedule fibers so that none get starved?

I'm not sure if it makes up for it. Threading in 1.8 not only required a
scheduler but hooks into the I/O routines so that they could indicate to
the Thread scheduler when they were going to block. If you were *just*
doing some CPU work and not I/O, then you could emulate the 1.8 thread
scheduler pretty easily but if you needed I/O, too, I'm not sure if that's
easy to do.

-- 
Toby DiPasquale
_______________________________________________
To unsubscribe or change your settings, visit:
http://lists.phillyonrails.org/mailman/listinfo/talk