async 2.6.3 → 2.6.5

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: 85ce7982fbc951dc88c43f5c19fe6d8bbbdd9bfe4dac1d624dbbea07a5d7a6a5
4
- data.tar.gz: 30efe433816cc976e2380332fe86baaa6b7175624d2d3cd9ee46c7c23781007b
3
+ metadata.gz: e0cfe1b6b08ec351525794bf18b2560f3a27c7b99dea7473da7f84c5b58007a7
4
+ data.tar.gz: 82e348d00328befab2e33e27e86c6e9f185ca8dcdce0c15f869ae3d7fc986378
5
5
  SHA512:
6
- metadata.gz: 612c391a6aaed9f793383023f1f29b304d72f1fbb391bc4c320e37ec651708c219026f2488466fcb3731d732d32a47822cd219fa754353f915e3263e7e5c66ce
7
- data.tar.gz: 817645de248bf18e360a7b9d799e900ec3165a1fb16a42efcfa198379c1fb347285f1839fd92d835f0c1dafe08f2a26420b3326e68d6bb023ab2fedce1070f50
6
+ metadata.gz: 065ce5006a47535ce599e337bd985b273a64f4e2c3a314177e80763d8c140117d0cf3f4e20ae95a886f9f861cdc4fb4b9f3129ed1955dc45f11cb4db63b8418c
7
+ data.tar.gz: 0ce35238436ea0205fcdde862925ed80932f62875dbcc05b1d25742ee3f2a42c0588709dd2abad7f33245d5f619c46322caa2534eddeffb5840778eada51f53d
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/async/node.rb CHANGED
@@ -123,10 +123,6 @@ module Async
123
123
  end
124
124
  end
125
125
 
126
- def annotation
127
- @annotation
128
- end
129
-
130
126
  def description
131
127
  @object_name ||= "#{self.class}:#{format '%#018x', object_id}#{@transient ? ' transient' : nil}"
132
128
 
@@ -171,17 +171,11 @@ module Async
171
171
 
172
172
  if timeout
173
173
  timer = @timers.after(timeout) do
174
- fiber.raise(TimeoutError)
174
+ fiber.transfer
175
175
  end
176
176
  end
177
177
 
178
- # Console.logger.info(self, "-> io_wait", fiber, io, events)
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 result was an exception, raise that exception.
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 @result.is_a?(Exception)
193
+ if @status == :failed
194
194
  raise @result
195
195
  else
196
196
  return @result
data/lib/async/version.rb CHANGED
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2017-2023, by Samuel Williams.
5
5
 
6
6
  module Async
7
- VERSION = "2.6.3"
7
+ VERSION = "2.6.5"
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.3
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-07-28 00:00:00.000000000 Z
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.7
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