async 2.15.2 → 2.15.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be0c94dc887562681bc88ba244ed1bdd85ff41cd5707b22208c44fde725459d0
4
- data.tar.gz: d91b6f27e96fb9c892fda055cdfb7bcc6564d89e9a02da3f9cf95c248d989360
3
+ metadata.gz: f7830bab72d5bdd68def8fe84b914785f191e29dc3f2d0b8f6d58d91878ff72d
4
+ data.tar.gz: c54b09d668152d3183ab8b366b75cc09c0e441a54914540896326e87b09a5fe7
5
5
  SHA512:
6
- metadata.gz: 1ec8529ee1df127e0527eb7346b9b606a3767c9ca51b812616d758e0ef2f83687829f9b70d517e4e0f18dd56b169e07fa0df9339fd96393e51388c2fb837eaaf
7
- data.tar.gz: 777d6eb933f5907504a129f3320f36bc3f9c199b5054d24c2bbdcdebb3d3f598bb064282cd7e07b8e75760cd7872119a4aa6c2d73df43b33dc42f60f1358cfd2
6
+ metadata.gz: 512e6fd4c720c19817bc95db9a7eb85f710314834cc655c9c1e43bac98831aab0802f9ef568de8e2308d1bb0a0304d6f3f4e2e8a465561ec20f79ac2644246d8
7
+ data.tar.gz: a0b8dae781660179da1a6ca0b766cbfdba8089684931cc95ea17e1dbf17667b96b34386e50fdceea97768af511dbbc6bbf90140c1027f53adc4db0a81e7d23bc
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/async/task.rb CHANGED
@@ -304,19 +304,23 @@ module Async
304
304
  # - false: defer_stop has been called and we are not stopping.
305
305
  # - true: defer_stop has been called and we will stop when exiting the block.
306
306
  if @defer_stop.nil?
307
- # If we are not deferring stop already, we can defer it now:
308
- @defer_stop = false
309
-
310
307
  begin
308
+ # If we are not deferring stop already, we can defer it now:
309
+ @defer_stop = false
310
+
311
311
  yield
312
312
  rescue Stop
313
313
  # If we are exiting due to a stop, we shouldn't try to invoke stop again:
314
314
  @defer_stop = nil
315
315
  raise
316
316
  ensure
317
+ defer_stop = @defer_stop
318
+
319
+ # We need to ensure the state is reset before we exit the block:
320
+ @defer_stop = nil
321
+
317
322
  # If we were asked to stop, we should do so now:
318
- if @defer_stop
319
- @defer_stop = nil
323
+ if defer_stop
320
324
  raise Stop, "Stopping current task (was deferred)!"
321
325
  end
322
326
  end
data/lib/async/version.rb CHANGED
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2017-2024, by Samuel Williams.
5
5
 
6
6
  module Async
7
- VERSION = "2.15.2"
7
+ VERSION = "2.15.3"
8
8
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.15.2
4
+ version: 2.15.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -63,7 +63,7 @@ cert_chain:
63
63
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
64
64
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
65
65
  -----END CERTIFICATE-----
66
- date: 2024-08-07 00:00:00.000000000 Z
66
+ date: 2024-08-08 00:00:00.000000000 Z
67
67
  dependencies:
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: console
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  - !ruby/object:Gem::Version
168
168
  version: '0'
169
169
  requirements: []
170
- rubygems_version: 3.5.11
170
+ rubygems_version: 3.5.13
171
171
  signing_key:
172
172
  specification_version: 4
173
173
  summary: A concurrency framework for Ruby.
metadata.gz.sig CHANGED
Binary file