Class: Mutant::Actor::Binding
- Inherits:
-
Object
- Object
- Mutant::Actor::Binding
- Defined in:
- lib/mutant/actor.rb
Overview
Binding to othersactors sender for simple RPC
Instance Method Summary collapse
-
#call(type) ⇒ Object
private
Send message and wait for reply.
Instance Method Details
#call(type) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Send message and wait for reply
52 53 54 55 56 57 |
# File 'lib/mutant/actor.rb', line 52 def call(type) other.call(Message.new(type, mailbox.sender)) = mailbox.receiver.call fail ProtocolError, "Expected #{type} but got #{.type}" unless type.equal?(.type) .payload end |