class Async::Task
def initialize(reactor, parent = Task.current?, logger: nil, &block)
-
parent
(Async::Task
) -- the parent task. -
reactor
(Async::Reactor
) -- the reactor this task will run within.
def initialize(reactor, parent = Task.current?, logger: nil, &block) super(parent || reactor) @reactor = reactor @status = :initialized @result = nil @finished = nil @logger = logger @fiber = make_fiber(&block) end