Class: Mutest::Actor::Sender Private

Inherits:
Object
  • Object
show all
Includes:
Adamantium::Flat
Defined in:
lib/mutest/actor/sender.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.

Sender for messages to acting thread

Instance Method Summary collapse

Instance Method Details

#call(message) ⇒ self

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 a message to actor

Parameters:

  • message (Object)

Returns:

  • (self)


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

def call(message)
  mutex.synchronize do
    messages << message
    condition_variable.signal
  end

  self
end