about summary refs log tree commit homepage
path: root/lib/rainbows/fiber
DateCommit message (Collapse)
2009-12-22common Rainbows.sleep(nr) method
We'll export this across the board to all Rack applications to sleep with. This provides the optimum method of sleeping regardless of the concurrency model you choose. This method is still highly not recommended for pure event-driven models like Rev or EventMachine (but the threaded/fiber/actor-based variants are fine).
2009-12-22new RevFiberSpawn concurrency model
This is like the traditional FiberSpawn, but more scalable (but not necessarily faster) as it can use epoll or kqueue.
2009-12-16cleanup: consolidate write_nonblock error handling
2009-12-16fiber/io: split out wait_readable and wait_writable methods
This makes them easier to override in subclasses.
2009-12-11env["hack.io"] for Fiber*, Revactor, Thread* models
This exposes a client IO object directly to the underlying application.
2009-11-26Fiber::Queue documentation
While we're at it, ensure our encoding is sane
2009-11-26split Fiber::Base into its own file
While Revactor uses Fiber::Queue in AppPool, we don't want/need to expose the rest of our Fiber stuff to it since it can lead to lost Fibers if misused. This includes the Rainbows::Fiber.sleep method which only works inside Fiber{Spawn,Pool} models and the Rainbows::Fiber::IO wrapper class.
2009-11-26Fiber*: cleanup scheduling, fix keepalive
Both FiberSpawn and FiberPool share similar main loops, the only difference being the handling of connection acceptance. So move the scheduler into it's own function for consistency. We'll also correctly implement keepalive timeout so clients get disconnected at the right time.
2009-11-25AppPool middleware now compatible with Fibers
This enables the safe use of Rainbows::AppPool with all concurrency models, not just threaded ones. AppPool is now effective with *all* Fiber-based concurrency models including Revactor (and of course the new Fiber{Pool,Spawn} ones).
2009-11-25add FiberSpawn concurrency model
This one seems a easy to get working and supports everything we need to support from the server perspective. Apps will need modified drivers, but it doesn't seem too hard to add more/better support for wrapping IO objects with Fiber::IO.