Skip to content

Commit 20a7083

Browse files
authored
Raise Stop directly in #defer_stop. (#311)
1 parent 959fc48 commit 20a7083

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/async/task.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def defer_stop
275275
# If we were asked to stop, we should do so now:
276276
if @defer_stop
277277
@defer_stop = nil
278-
self.stop
278+
raise Stop, "Stopping current task (was deferred)!"
279279
end
280280
end
281281
else

0 commit comments

Comments
 (0)