Class: Mutant::Actor::Env Private

Inherits:
Object
  • Object
show all
Defined in:
lib/mutant/actor/env.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.

Actor root environment

Instance Method Summary collapse

Instance Method Details

#new_mailboxMailbox

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 unbound mailbox

Returns:



23
24
25
# File 'lib/mutant/actor/env.rb', line 23

def new_mailbox
  Mailbox.new
end

#spawnActor::Sender

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.

Spawn a new actor executing block

Returns:



10
11
12
13
14
15
16
17
18
# File 'lib/mutant/actor/env.rb', line 10

def spawn
  mailbox = new_mailbox

  thread_root.new do
    yield mailbox
  end

  mailbox.sender
end