Class: Mutant::Actor::Env
- Inherits:
-
Object
- Object
- Mutant::Actor::Env
- Defined in:
- lib/mutant/actor/env.rb
Overview
Actor root environment
Instance Method Summary collapse
-
#new_mailbox ⇒ Mailbox
private
New unbound mailbox.
-
#spawn ⇒ Actor::Sender
private
Spawn a new actor executing block.
Instance Method Details
#new_mailbox ⇒ Mailbox
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
27 28 29 |
# File 'lib/mutant/actor/env.rb', line 27 def new_mailbox Mailbox.new end |
#spawn ⇒ Actor::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
12 13 14 15 16 17 18 19 20 |
# File 'lib/mutant/actor/env.rb', line 12 def spawn mailbox = new_mailbox thread_root.new do yield mailbox end mailbox.sender end |