diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-07-29 07:05:48 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-07-29 08:04:03 +0000 |
commit | 5479b15c766204e31495e87a64fa689141cc38a3 (patch) | |
tree | 022b17ec84c6ceebc95b5cdf6088878245bf12e5 /lib/rainbows/dev_fd_response.rb | |
parent | f309cfaf70cbffd7a39208da869e47784e4cb41b (diff) | |
download | rainbows-5479b15c766204e31495e87a64fa689141cc38a3.tar.gz |
Proxying regular Ruby IO objects while Revactor is in use is highly suboptimal, so proxy it with an Actor-aware wrapper for better scheduling.
Diffstat (limited to 'lib/rainbows/dev_fd_response.rb')
-rw-r--r-- | lib/rainbows/dev_fd_response.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rainbows/dev_fd_response.rb b/lib/rainbows/dev_fd_response.rb index 691526c..d839803 100644 --- a/lib/rainbows/dev_fd_response.rb +++ b/lib/rainbows/dev_fd_response.rb @@ -53,6 +53,8 @@ class Rainbows::DevFdResponse < Struct.new(:app) case env["rainbows.model"] when :FiberSpawn, :FiberPool, :RevFiberSpawn io = Rainbows::Fiber::IO.new(io,::Fiber.current) + when :Revactor + io = Rainbows::Revactor::Proxy.new(io) end else # unlikely, char/block device file, directory, ... return response |