From 5479b15c766204e31495e87a64fa689141cc38a3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 29 Jul 2010 07:05:48 +0000 Subject: revactor: Actor-aware dev_fd_response proxying Proxying regular Ruby IO objects while Revactor is in use is highly suboptimal, so proxy it with an Actor-aware wrapper for better scheduling. --- lib/rainbows/dev_fd_response.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/rainbows/dev_fd_response.rb') 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 -- cgit v1.2.3-24-ge0c7