Rainbows! Rack HTTP server user/dev discussion
 help / color / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
						download: 
* [PATCH] event_machine: join reactor_thread if it is already running rather than falling through worker_loop
@ 2013-01-11 11:57 Mark J. Titorenko
      [irrelevant] ` <F24725C0-EE29-4AA0-85C3-8E0A756EB9F9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ results
From: Mark J. Titorenko @ 2013-01-11 11:57 UTC (permalink / raw)
  To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw

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.

Cheers,

Mark.

---
 lib/rainbows/event_machine.rb |    1 +
 1 file changed, 1 insertion(+)

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:
-- 
1.7.9.6 (Apple Git-31.1)

_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[relevance 7%]

* Re: [PATCH] event_machine: join reactor_thread if it is already running rather than falling through worker_loop
      [irrelevant] ` <F24725C0-EE29-4AA0-85C3-8E0A756EB9F9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-01-11 20:18   ` Eric Wong
  0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2013-01-11 20:18 UTC (permalink / raw)
  To: Rainbows! list

"Mark J. Titorenko" <mark.titorenko-82pbMkz6NcNsbIuE7sb01tBPR1lH4CV8@public.gmane.org> wrote:
> 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.

Thanks Mark!  Pushed out as a12d2e64e04b5098f31e63a72ea8330b6c8f3a19
(line-wrapped commit message) to git://bogomips.org/rainbows.git
_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[relevance 7%]

* [ANN] Rainbows! 4.4.3 - bugfixes for EventMachine users
@ 2013-01-18 11:31 Eric Wong
  0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2013-01-18 11:31 UTC (permalink / raw)
  To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw

Changes:

This release contains bugfixes from Lin Jen-Shin and Mark J. Titorenko
for EventMachine.  There are also some minor cleanups.

Lin Jen-Shin (1):
      event_machine: avoid close on deferred response

Mark J. Titorenko (1):
      event_machine: join reactor_thread if it is already running

Eric Wong (2):
      event_machine: cleanup confusing assignment
      t/GNUmakefile: cleanup test dependencies

* http://rainbows.rubyforge.org/
* rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
* git://bogomips.org/rainbows.git
* http://rainbows.rubyforge.org/NEWS.atom.xml

-- 
Eric Wong
_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[relevance 4%]

Results 1-3 of 3 | reverse results
2013-01-11 11:57 [PATCH] event_machine: join reactor_thread if it is already running rather than falling through worker_loop Mark J. Titorenko
    [irrelevant] ` <F24725C0-EE29-4AA0-85C3-8E0A756EB9F9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-01-11 20:18   ` Eric Wong
2013-01-18 11:31 [ANN] Rainbows! 4.4.3 - bugfixes for EventMachine users Eric Wong


Rainbows! Rack HTTP server user/dev discussion

Archives are clonable:
	git clone --mirror https://bogomips.org/rainbows-public
	git clone --mirror http://ou63pmih66umazou.onion/rainbows-public

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.rainbows
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.rainbows

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git