From c50b69ddf0f1305bb39ed812d084f59db6dd9897 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 1 Dec 2009 22:39:38 -0800 Subject: more consistent code for worker timeout/exits We now correctly exit!(2) if our master can't kill us. --- lib/rainbows/revactor.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/rainbows/revactor.rb') diff --git a/lib/rainbows/revactor.rb b/lib/rainbows/revactor.rb index 125e148..b647d48 100644 --- a/lib/rainbows/revactor.rb +++ b/lib/rainbows/revactor.rb @@ -116,9 +116,7 @@ module Rainbows end end - Actor.sleep 1 while G.tick - expire = Time.now + timeout * 2.0 - Actor.sleep 1 while nr > 0 && Time.now < expire + Actor.sleep 1 while G.tick || nr > 0 rescue Errno::EMFILE => e end -- cgit v1.2.3-24-ge0c7