async 2.4.1 → 2.4.2

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: e0734cd025e0357960356ceac7c51d2a3c33efe60f62fcd0ab3d09a528866d7b
4
- data.tar.gz: b9658e9b523e90a8d863c2f52cbf4fc8492fe42e6cc63422cb9af2af50582362
3
+ metadata.gz: 2d64eb10a6e308731e79afd4591092d17ef5d4ffca9e40d9ee128a1d14b30669
4
+ data.tar.gz: 8c5fda19ac8eb203bdd6a27100f90b47295d1ff882811d78da257342ae240258
5
5
  SHA512:
6
- metadata.gz: 0436e9692d113d2ee40e76e3c792f7ae81a7c563bc93cfe04470fcb84c610795d49a35dfaffa4f7c7f62d2b20efe316d796ca1a573bd997f654db5ba55f9f07a
7
- data.tar.gz: 031eab57b8164cd1aa040a4e10d509d3c32db61331cda40c9a5689ef49b199f1d107e0edc154aa2bd5377ea848e0bdaf943b14ba3d3f5d30619c5dcef5ec496a
6
+ metadata.gz: b1b8f7644eda45639f9a53e314b195ad2955b10358148edf6e698be89cb7232c22be15d3a0214f14a2053bc4a6e3e78683f1ef22d1da02a1fc7cd83e1a71b2fc
7
+ data.tar.gz: 109375f5cd3c217341316c4b5f390d7a2a57bda847bbaa8d98ec13e93fa9dbc6905978bad00641182b7d4daf4e87c0ac7286b43ca5a6522f0610b37e8206d7df
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/async/node.rb CHANGED
@@ -231,6 +231,8 @@ module Async
231
231
  @children&.each do |child|
232
232
  child.terminate
233
233
  end
234
+
235
+ return @children.nil?
234
236
  end
235
237
 
236
238
  # Attempt to stop the current node immediately, including all non-transient children. Invokes {#stop_children} to stop all children.
@@ -42,10 +42,12 @@ module Async
42
42
 
43
43
  # @public Since `stable-v1`.
44
44
  def close
45
- # This is a critical step. Because tasks could be stored as instance variables, and since the reactor is (probably) going out of scope, we need to ensure they are stopped. Otherwise, the tasks will belong to a reactor that will never run again and are not stopped.
46
- self.terminate
45
+ # It's critical to stop all tasks. Otherwise they might be holding on to resources which are never closed/released correctly.
46
+ until self.terminate
47
+ self.run_once
48
+ end
47
49
 
48
- Kernel::raise "Closing scheduler with blocked operations!" if @blocked > 0
50
+ Kernel.raise "Closing scheduler with blocked operations!" if @blocked > 0
49
51
 
50
52
  # We depend on GVL for consistency:
51
53
  # @guard.synchronize do
data/lib/async/version.rb CHANGED
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2017-2022, by Samuel Williams.
5
5
 
6
6
  module Async
7
- VERSION = "2.4.1"
7
+ VERSION = "2.4.2"
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.4.1
4
+ version: 2.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -56,7 +56,7 @@ cert_chain:
56
56
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
57
57
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
58
58
  -----END CERTIFICATE-----
59
- date: 2023-03-07 00:00:00.000000000 Z
59
+ date: 2023-03-11 00:00:00.000000000 Z
60
60
  dependencies:
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: console
metadata.gz.sig CHANGED
Binary file