async 2.6.3 → 2.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/node.rb +0 -4
- data/lib/async/scheduler.rb +2 -8
- data/lib/async/task.rb +2 -2
- data/lib/async/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0cfe1b6b08ec351525794bf18b2560f3a27c7b99dea7473da7f84c5b58007a7
|
4
|
+
data.tar.gz: 82e348d00328befab2e33e27e86c6e9f185ca8dcdce0c15f869ae3d7fc986378
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 065ce5006a47535ce599e337bd985b273a64f4e2c3a314177e80763d8c140117d0cf3f4e20ae95a886f9f861cdc4fb4b9f3129ed1955dc45f11cb4db63b8418c
|
7
|
+
data.tar.gz: 0ce35238436ea0205fcdde862925ed80932f62875dbcc05b1d25742ee3f2a42c0588709dd2abad7f33245d5f619c46322caa2534eddeffb5840778eada51f53d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/async/node.rb
CHANGED
data/lib/async/scheduler.rb
CHANGED
@@ -171,17 +171,11 @@ module Async
|
|
171
171
|
|
172
172
|
if timeout
|
173
173
|
timer = @timers.after(timeout) do
|
174
|
-
fiber.
|
174
|
+
fiber.transfer
|
175
175
|
end
|
176
176
|
end
|
177
177
|
|
178
|
-
|
179
|
-
events = @selector.io_wait(fiber, io, events)
|
180
|
-
# Console.logger.info(self, "<- io_wait", fiber, io, events)
|
181
|
-
|
182
|
-
return events
|
183
|
-
rescue TimeoutError
|
184
|
-
return false
|
178
|
+
return @selector.io_wait(fiber, io, events)
|
185
179
|
ensure
|
186
180
|
timer&.cancel
|
187
181
|
end
|
data/lib/async/task.rb
CHANGED
@@ -175,7 +175,7 @@ module Async
|
|
175
175
|
return task
|
176
176
|
end
|
177
177
|
|
178
|
-
# Retrieve the current result of the task. Will cause the caller to wait until result is available. If the
|
178
|
+
# Retrieve the current result of the task. Will cause the caller to wait until result is available. If the task resulted in an unhandled error (derived from `StandardError`), this will be raised. If the task was stopped, this will return `nil`.
|
179
179
|
#
|
180
180
|
# Conceptually speaking, waiting on a task should return a result, and if it throws an exception, this is certainly an exceptional case that should represent a failure in your program, not an expected outcome. In other words, you should not design your programs to expect exceptions from `#wait` as a normal flow control, and prefer to catch known exceptions within the task itself and return a result that captures the intention of the failure, e.g. a `TimeoutError` might simply return `nil` or `false` to indicate that the operation did not generate a valid result (as a timeout was an expected outcome of the internal operation in this case).
|
181
181
|
#
|
@@ -190,7 +190,7 @@ module Async
|
|
190
190
|
@finished.wait
|
191
191
|
end
|
192
192
|
|
193
|
-
if @
|
193
|
+
if @status == :failed
|
194
194
|
raise @result
|
195
195
|
else
|
196
196
|
return @result
|
data/lib/async/version.rb
CHANGED
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.
|
4
|
+
version: 2.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -58,7 +58,7 @@ cert_chain:
|
|
58
58
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
59
59
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
60
60
|
-----END CERTIFICATE-----
|
61
|
-
date: 2023-
|
61
|
+
date: 2023-10-29 00:00:00.000000000 Z
|
62
62
|
dependencies:
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
64
|
name: console
|
@@ -266,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
266
266
|
- !ruby/object:Gem::Version
|
267
267
|
version: '0'
|
268
268
|
requirements: []
|
269
|
-
rubygems_version: 3.4.
|
269
|
+
rubygems_version: 3.4.10
|
270
270
|
signing_key:
|
271
271
|
specification_version: 4
|
272
272
|
summary: A concurrency framework for Ruby.
|
metadata.gz.sig
CHANGED
Binary file
|