lib/async/task.rb in async-2.8.1 vs lib/async/task.rb in async-2.8.2
- old
+ new
@@ -207,11 +207,11 @@
#
# @parameter later [Boolean] Whether to stop the task later, or immediately.
def stop(later = false)
if self.stopped?
# If we already stopped this task... don't try to stop it again:
- return
+ return stopped!
end
# If the fiber is alive, we need to stop it:
if @fiber&.alive?
if self.current?
@@ -302,10 +302,10 @@
@status = :stopped
stopped = false
begin
- # We are bnot running, but children might be so we should stop them:
+ # We are not running, but children might be so we should stop them:
stop_children(true)
rescue Stop
stopped = true
# If we are stopping children, and one of them tries to stop the current task, we should ignore it. We will be stopped later.
retry