class Async::Task

def initialize(reactor, parent = Task.current?, logger: 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, **options, &block)
	super(parent || reactor, **options)
	
	@reactor = reactor
	
	@status = :initialized
	@result = nil
	@finished = nil
	
	@logger = logger
	
	@fiber = make_fiber(&block)
end