class Async::Task

def initialize(reactor, parent = Task.current?, logger: nil, finished: nil, **options, &block)

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