lib/async/task.rb in async-1.28.5 vs lib/async/task.rb in async-1.28.6

- old
+ new

@@ -70,17 +70,17 @@ end # Create a new task. # @param reactor [Async::Reactor] the reactor this task will run within. # @param parent [Async::Task] the parent task. - def initialize(reactor, parent = Task.current?, logger: nil, **options, &block) + def initialize(reactor, parent = Task.current?, logger: nil, finished: nil, **options, &block) super(parent || reactor, **options) @reactor = reactor @status = :initialized @result = nil - @finished = nil + @finished = finished @logger = logger @fiber = make_fiber(&block) end