Class: Mutant::Actor::Receiver

Inherits:
Object
  • Object
show all
Includes:
Adamantium::Flat
Defined in:
lib/mutant/actor/receiver.rb

Overview

Receiver side of an actor

Instance Method Summary collapse

Instance Method Details

#callObject

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.

Receives a message, blocking

Returns:

  • (Object)

13
14
15
16
17
18
19
# File 'lib/mutant/actor/receiver.rb', line 13

def call
  2.times do
    message = try_blocking_receive
    return message unless message.equal?(Undefined)
  end
  fail ProtocolError
end