From 20a708339c08281f84613a6799043513b49fc2f1 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Thu, 28 Mar 2024 12:35:26 +1300 Subject: [PATCH 1/2] Raise `Stop` directly in `#defer_stop`. (#311) --- lib/async/task.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/async/task.rb b/lib/async/task.rb index 3db30a31..97a6f00d 100644 --- a/lib/async/task.rb +++ b/lib/async/task.rb @@ -275,7 +275,7 @@ def defer_stop # If we were asked to stop, we should do so now: if @defer_stop @defer_stop = nil - self.stop + raise Stop, "Stopping current task (was deferred)!" end end else From 0cb86f9343f70dc777376b5d8dd184b6aede294b Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Thu, 28 Mar 2024 12:48:12 +1300 Subject: [PATCH 2/2] Bump patch version. --- lib/async/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/async/version.rb b/lib/async/version.rb index 366bb94c..1103269a 100644 --- a/lib/async/version.rb +++ b/lib/async/version.rb @@ -4,5 +4,5 @@ # Copyright, 2017-2024, by Samuel Williams. module Async - VERSION = "2.10.0" + VERSION = "2.10.1" end