Class: Airflow::Reactor::AsyncWrapper
- Inherits:
-
Object
- Object
- Airflow::Reactor::AsyncWrapper
- Defined in:
- lib/async_flow/reactor.rb
Instance Method Summary collapse
-
#initialize(async_task) ⇒ AsyncWrapper
constructor
A new instance of AsyncWrapper.
- #schedule ⇒ Object
-
#wait ⇒ Object
TODO: Unused.
Constructor Details
#initialize(async_task) ⇒ AsyncWrapper
Returns a new instance of AsyncWrapper.
13 14 15 |
# File 'lib/async_flow/reactor.rb', line 13 def initialize(async_task) @async_task = async_task end |
Instance Method Details
#schedule ⇒ Object
17 18 19 20 |
# File 'lib/async_flow/reactor.rb', line 17 def schedule task = async_task.async { |subtask| yield(AsyncWrapper.new(subtask)) } AsyncWrapper.new(task) end |
#wait ⇒ Object
TODO: Unused
23 24 25 |
# File 'lib/async_flow/reactor.rb', line 23 def wait async_task.wait end |