Class: Mutest::Actor::Mailbox Private

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Unbound mailbox

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.newMailbox

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.

New mailbox

Returns:



10
11
12
13
14
15
16
17
18
19
# File 'lib/mutest/actor/mailbox.rb', line 10

def self.new
  mutex              = Mutex.new
  condition_variable = ConditionVariable.new
  messages           = []

  super(
    Receiver.new(condition_variable, mutex, messages),
    Sender.new(condition_variable, mutex, messages)
  )
end

Instance Method Details

#bind(other) ⇒ Binding

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.

Binding for RPC to other actors

Parameters:

Returns:



26
27
28
# File 'lib/mutest/actor/mailbox.rb', line 26

def bind(other)
  Binding.new(self, other)
end