[PATCH 2/1] fix Ruby 1.8 detection for (possible) green thread fix

Eric Wong normalperson at yhbt.net
Tue Dec 22 15:50:08 EST 2009


Thanks to Ben Sandofsky for the extra set of eyes
---

 The patch yesterday was bogus and needs this, also pushed out to
 rainbows.git of course.

 lib/rainbows/base.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/rainbows/base.rb b/lib/rainbows/base.rb
index 4a4d076..20c7681 100644
--- a/lib/rainbows/base.rb
+++ b/lib/rainbows/base.rb
@@ -15,7 +15,7 @@ module Rainbows
       G.tmp = worker.tmp
 
       # avoid spurious wakeups and blocking-accept() with 1.8 green threads
-      if RUBY_VERSION.to_f < 1.8
+      if RUBY_VERSION.to_f < 1.9
         require "io/nonblock"
         LISTENERS.each { |l| l.nonblock = true }
       end
-- 
Eric Wong


More information about the rainbows-talk mailing list