refactor response body handling for sendfile(2)
commit39b178cdebe275cbc8ce19cf269bea7cd15ff4ca
authorEric Wong <normalperson@yhbt.net>
Sun, 4 Jul 2010 22:16:52 +0000 (4 22:16 +0000)
committerEric Wong <normalperson@yhbt.net>
Sun, 4 Jul 2010 22:34:09 +0000 (4 22:34 +0000)
treeb7628ed278895fcf70ea3206956be586ac9e1ac5
parent75f5aa9a0d6b37a94afbea3121fc2c16e70a2b1d
refactor response body handling for sendfile(2)

This hopefully allows the "sendfile" gem to be required
anywhere in the Rainbows!/Unicorn config file, and not
have to be required via RUBYOPT or the '-r' command-line
switch.

We also modularize HttpResponse and avoids singleton methods
in the response path.  This (hopefully) makes it easier for
individual concurrency models to share code and override
individual methods.
20 files changed:
lib/rainbows.rb
lib/rainbows/base.rb
lib/rainbows/event_machine.rb
lib/rainbows/fiber/base.rb
lib/rainbows/fiber/body.rb [new file with mode: 0644]
lib/rainbows/fiber/rev.rb
lib/rainbows/fiber_pool.rb
lib/rainbows/fiber_spawn.rb
lib/rainbows/http_response.rb
lib/rainbows/http_response/body.rb [new file with mode: 0644]
lib/rainbows/rev/client.rb
lib/rainbows/rev/core.rb
lib/rainbows/rev/deferred_response.rb
lib/rainbows/rev/thread.rb
lib/rainbows/rev_fiber_spawn.rb
lib/rainbows/revactor.rb
lib/rainbows/sendfile.rb
lib/rainbows/writer_thread_pool.rb
lib/rainbows/writer_thread_spawn.rb
t/t0020-large-sendfile-response.sh