diff options
author | Mark J. Titorenko <mark.titorenko@alces-software.com> | 2013-01-11 11:57:12 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-01-11 19:59:36 +0000 |
commit | a12d2e64e04b5098f31e63a72ea8330b6c8f3a19 (patch) | |
tree | ad10e340cf605b7d244eb5d56aa9e8796bc07310 /lib/rainbows/event_machine.rb | |
parent | 28eaf3e766f5dddc6ca073a155b8005afdaecfba (diff) | |
download | rainbows-a12d2e64e04b5098f31e63a72ea8330b6c8f3a19.tar.gz |
...rather than falling through worker_loop Prior to the application of this patch, if an EventMachine reactor_thread has already been started elsewhere before the worker_loop is entered, the worker_loop exits as a second call to EM.run does not block the current thread. This patch causes the worker_loop thread to join the reactor_thread if it is running. [ew: commit message formatting] Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'lib/rainbows/event_machine.rb')
-rw-r--r-- | lib/rainbows/event_machine.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/rainbows/event_machine.rb b/lib/rainbows/event_machine.rb index 3ecdb4f..b143b39 100644 --- a/lib/rainbows/event_machine.rb +++ b/lib/rainbows/event_machine.rb @@ -99,6 +99,7 @@ module Rainbows::EventMachine end end } + EM.reactor_thread.join if EM.reactor_running? end end # :enddoc: |