Skip to content

Commit

Permalink
Avoid deadlocks when chaining synchronous calls
Browse files Browse the repository at this point in the history
  • Loading branch information
e2 committed Apr 8, 2015
1 parent c5ca358 commit 5e17eae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/celluloid/proxies/sync_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ def method_missing(meth, *args, &block)

if @mailbox == ::Thread.current[:celluloid_mailbox]
args.unshift meth
meth = :__send__
# meth = :__send__

actor = Thread.current[:celluloid_actor]
actor = actor.behavior.subject.bare_object
return actor.__send__(*args)
end

call = SyncCall.new(::Celluloid.mailbox, meth, args, block)
Expand Down

0 comments on commit 5e17eae

Please sign in to comment.