From 756c060f2992d35e30249688f1cfab8de9b4dfc1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 4 Oct 2009 03:23:57 -0700 Subject: revactor: graceful exit if a listening actor dies It's usually a bad sign if we have unhandled exceptions in the listener loops, so we'll exit just in case. --- lib/rainbows/revactor.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/rainbows/revactor.rb b/lib/rainbows/revactor.rb index a0740fa..a20e09a 100644 --- a/lib/rainbows/revactor.rb +++ b/lib/rainbows/revactor.rb @@ -102,6 +102,7 @@ module Rainbows filter.after(1) do if alive alive.chmod(nr = 0 == nr ? 1 : 0) + listeners.each { |l| alive = false if l.dead? } ppid == Process.ppid or alive = false end end -- cgit v1.2.3-24-ge0c7