make the reactor threadsafe #97

Open
tmm1 opened this Issue Oct 12, 2010 · 2 comments

Comments

Projects
None yet
3 participants
@tmm1
Contributor

tmm1 commented Oct 12, 2010

EM is completely thread-unsafe, which causes all sorts of issues (especially on JRuby).

For instance, sending data to a connection from a non-reactor thread, or invoking EM functions from within signal handlers (i.e. trap{ AMQP.stop }) causes problems.

@raggi

This comment has been minimized.

Show comment
Hide comment
@raggi

raggi Oct 13, 2010

Contributor

Recommend EM captures traps and aggregates them into a next tick, maybe an API of EM.trap { ... }. It's not ideal, but, it will solve the problem without monkey patching core libraries.

Contributor

raggi commented Oct 13, 2010

Recommend EM captures traps and aggregates them into a next tick, maybe an API of EM.trap { ... }. It's not ideal, but, it will solve the problem without monkey patching core libraries.

@benlangfeld

This comment has been minimized.

Show comment
Hide comment
@benlangfeld

benlangfeld Nov 20, 2011

I'm interested to know exactly what issues have been observed when "sending data to a connection from a non-reactor thread". Further information about eventmachine's failings in this area would be very useful.

I'm interested to know exactly what issues have been observed when "sending data to a connection from a non-reactor thread". Further information about eventmachine's failings in this area would be very useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment