about summary refs log tree commit homepage
path: root/lib/rainbows/dev_fd_response.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-07-29 07:05:48 +0000
committerEric Wong <normalperson@yhbt.net>2010-07-29 08:04:03 +0000
commit5479b15c766204e31495e87a64fa689141cc38a3 (patch)
tree022b17ec84c6ceebc95b5cdf6088878245bf12e5 /lib/rainbows/dev_fd_response.rb
parentf309cfaf70cbffd7a39208da869e47784e4cb41b (diff)
downloadrainbows-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.rb2
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