lib/async/task.rb in async-1.14.0 vs lib/async/task.rb in async-1.15.0

- old
+ new

@@ -74,11 +74,11 @@ "<#{self.description} #{@status}>" end # @attr ios [Reactor] The reactor the task was created within. attr :reactor - def_delegators :@reactor, :timeout, :sleep + def_delegators :@reactor, :with_timeout, :timeout, :sleep # Yield back to the reactor and allow other fibers to execute. def yield reactor.yield end @@ -88,11 +88,11 @@ def_delegators :@fiber, :alive? # @attr status [Symbol] The status of the execution of the fiber, one of `:initialized`, `:running`, `:complete`, `:stopped` or `:failed`. attr :status - # Resume the execution of the task. + # Begin the execution of the task. def run(*args) if @status == :initialized @status = :running @fiber.resume(*args) else @@ -122,9 +122,10 @@ end end # Deprecated. alias result wait + # Soon to become attr :result # Stop the task and all of its children. # @return [void] def stop @children.each(&:stop)