async 2.6.0 → 2.6.1

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: 0f62c8150ba7dba6f26532b080a4c99ecde97d86cf5f31746aec706d12644550
4
- data.tar.gz: 99bbe4f65da2c18ab75bc67377896b7b6c26f6056eb789ef22d5601f43526228
3
+ metadata.gz: f927b2f4b64bf4a43b901089b38eb64ba01baf0ac37dd970fe52506c31109aa6
4
+ data.tar.gz: c61ae34c4bd306249a2a7f28e9c3df4311b8b72672acf98eac4cced17b4c03ad
5
5
  SHA512:
6
- metadata.gz: 3c6a7fee5fb6d429b7533afb80dd38ad499c8dd313ee5f881cdd19479a8f1f28072f16f07f83305f6d2e6ddaa7907859938fcd69e2fc7b0e945b194588fd22e2
7
- data.tar.gz: f10a739ba6013c928199c4abe884e9dbf9d4d48d7f8329ed3977bb9230584d100505d617a859c113bf04c25cbf9ae4353e525221563f930227467cbaebf153b1
6
+ metadata.gz: 1be5a97431b3c73aaee1b990f99bb2c90f0b1c1f5a82f1f63dc7cb79e8009c9a9b24abf17ec34f5efbd1408afa5b19a423e0eaa38b08c9feb76a474aeecf48bc
7
+ data.tar.gz: e34b4ae8184222314883f54696ac55ab7fde069e74f05f8c4aea9be7a834b16576642ad8a9bed0000a9b8a3b1102309545940ef8a03a1aafa9c76813a05da0f8
checksums.yaml.gz.sig CHANGED
Binary file
@@ -50,7 +50,7 @@ module Async
50
50
  def close
51
51
  # It's critical to stop all tasks. Otherwise they might be holding on to resources which are never closed/released correctly.
52
52
  until self.terminate
53
- self.run_once
53
+ self.run_once!
54
54
  end
55
55
 
56
56
  Kernel.raise "Closing scheduler with blocked operations!" if @blocked > 0
@@ -215,6 +215,16 @@ module Async
215
215
  return false
216
216
  end
217
217
 
218
+ return run_once!(timeout)
219
+ end
220
+
221
+ # Run one iteration of the event loop.
222
+ #
223
+ # When terminating the event loop, we already know we are finished. So we don't need to check the task tree. This is a logical requirement because `run_once` ignores transient tasks. For example, a single top level transient task is not enough to keep the reactor running, but during termination we must still process it in order to terminate child tasks.
224
+ #
225
+ # @parameter timeout [Float | Nil] The maximum timeout, or if nil, indefinite.
226
+ # @returns [Boolean] Whether there is more work to do.
227
+ private def run_once!(timeout = 0)
218
228
  interval = @timers.wait_interval
219
229
 
220
230
  # If there is no interval to wait (thus no timers), and no tasks, we could be done:
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.6.0"
7
+ VERSION = "2.6.1"
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.6.0
4
+ version: 2.6.1
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-06-07 00:00:00.000000000 Z
59
+ date: 2023-06-09 00:00:00.000000000 Z
60
60
  dependencies:
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: console
@@ -261,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
261
  - !ruby/object:Gem::Version
262
262
  version: '0'
263
263
  requirements: []
264
- rubygems_version: 3.4.7
264
+ rubygems_version: 3.5.0.dev
265
265
  signing_key:
266
266
  specification_version: 4
267
267
  summary: A concurrency framework for Ruby.
metadata.gz.sig CHANGED
Binary file