Class: StandardProcedure::Async::Actor::Message
- Inherits:
-
Object
- Object
- StandardProcedure::Async::Actor::Message
- Defined in:
- lib/standard_procedure/async/actor.rb
Overview
nodoc:
Instance Method Summary collapse
- #call ⇒ Object
- #then(&block) ⇒ Object
- #value(timeout: 30) ⇒ Object (also: #get, #await)
Instance Method Details
#call ⇒ Object
69 70 71 |
# File 'lib/standard_procedure/async/actor.rb', line 69 def call result.put target.send(name, *args, **params, &block) end |
#then(&block) ⇒ Object
65 66 67 |
# File 'lib/standard_procedure/async/actor.rb', line 65 def then &block block&.call value end |
#value(timeout: 30) ⇒ Object Also known as: get, await
57 58 59 60 61 |
# File 'lib/standard_procedure/async/actor.rb', line 57 def value(timeout: 30) result.take(timeout).tap do |value| raise value if value.is_a? Exception end end |