async 2.15.1 → 2.15.2
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/task.rb +12 -7
- data/lib/async/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- 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: be0c94dc887562681bc88ba244ed1bdd85ff41cd5707b22208c44fde725459d0
|
4
|
+
data.tar.gz: d91b6f27e96fb9c892fda055cdfb7bcc6564d89e9a02da3f9cf95c248d989360
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ec8529ee1df127e0527eb7346b9b606a3767c9ca51b812616d758e0ef2f83687829f9b70d517e4e0f18dd56b169e07fa0df9339fd96393e51388c2fb837eaaf
|
7
|
+
data.tar.gz: 777d6eb933f5907504a129f3320f36bc3f9c199b5054d24c2bbdcdebb3d3f598bb064282cd7e07b8e75760cd7872119a4aa6c2d73df43b33dc42f60f1358cfd2
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/async/task.rb
CHANGED
@@ -253,18 +253,18 @@ module Async
|
|
253
253
|
return stopped!
|
254
254
|
end
|
255
255
|
|
256
|
-
# If we are deferring stop...
|
257
|
-
if @defer_stop == false
|
258
|
-
# Don't stop now... but update the state so we know we need to stop later.
|
259
|
-
@defer_stop = true
|
260
|
-
return false
|
261
|
-
end
|
262
|
-
|
263
256
|
# If the fiber is alive, we need to stop it:
|
264
257
|
if @fiber&.alive?
|
265
258
|
# As the task is now exiting, we want to ensure the event loop continues to execute until the task finishes.
|
266
259
|
self.transient = false
|
267
260
|
|
261
|
+
# If we are deferring stop...
|
262
|
+
if @defer_stop == false
|
263
|
+
# Don't stop now... but update the state so we know we need to stop later.
|
264
|
+
@defer_stop = true
|
265
|
+
return false
|
266
|
+
end
|
267
|
+
|
268
268
|
if self.current?
|
269
269
|
# If the fiber is current, and later is `true`, we need to schedule the fiber to be stopped later, as it's currently invoking `stop`:
|
270
270
|
if later
|
@@ -326,6 +326,11 @@ module Async
|
|
326
326
|
end
|
327
327
|
end
|
328
328
|
|
329
|
+
# @returns [Boolean] Whether stop has been deferred.
|
330
|
+
def stop_deferred?
|
331
|
+
@defer_stop
|
332
|
+
end
|
333
|
+
|
329
334
|
# Lookup the {Task} for the current fiber. Raise `RuntimeError` if none is available.
|
330
335
|
# @returns [Task]
|
331
336
|
# @raises[RuntimeError] If task was not {set!} for the current fiber.
|
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.15.
|
4
|
+
version: 2.15.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -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.
|
170
|
+
rubygems_version: 3.5.11
|
171
171
|
signing_key:
|
172
172
|
specification_version: 4
|
173
173
|
summary: A concurrency framework for Ruby.
|
metadata.gz.sig
CHANGED
Binary file
|