Fiber*: cleanup scheduling, fix keepalive
commit278d9d5a7f3d2dc3c6563af1584b5e773e08073d
authorEric Wong <normalperson@yhbt.net>
Thu, 26 Nov 2009 08:41:26 +0000 (26 00:41 -0800)
committerEric Wong <normalperson@yhbt.net>
Thu, 26 Nov 2009 21:41:06 +0000 (26 13:41 -0800)
treea3066da21425c49f3ca89bb8cf3af2ab03c285d0
parent1079dfa30108466d413f30526eda468cdf0ae985
Fiber*: 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.
lib/rainbows/fiber.rb
lib/rainbows/fiber/io.rb
lib/rainbows/fiber_pool.rb
lib/rainbows/fiber_spawn.rb
t/t0010-keepalive-timeout-effective.sh [new file with mode: 0755]