diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-04-21 21:21:13 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-04-21 21:21:13 +0000 |
commit | 71d48a01a7c257dffa22c10781c55deff64037d2 (patch) | |
tree | 7b1d12ceb6d1652816195d0bd983e06ef2615fcb /lib | |
parent | 7f368d2cf9e456e37f1489dc275ed0de007175dd (diff) | |
download | rainbows-71d48a01a7c257dffa22c10781c55deff64037d2.tar.gz |
Should be fixed in 1.9.3 and/or future Kgio...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rainbows/join_threads.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/rainbows/join_threads.rb b/lib/rainbows/join_threads.rb index ba67c94..5d5c64f 100644 --- a/lib/rainbows/join_threads.rb +++ b/lib/rainbows/join_threads.rb @@ -5,9 +5,13 @@ module Rainbows::JoinThreads # blocking acceptor threads must be forced to run def self.acceptors(threads) + expire = Time.now + Rainbows.server.timeout threads.delete_if do |thr| Rainbows.tick begin + # blocking accept() may not wake up properly + thr.raise(Errno::EINTR) if Time.now > expire && "sleep" == thr.status + thr.run thr.join(0.01) rescue |