async 2.28.0 → 2.28.1
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/barrier.rb +3 -1
- data/lib/async/queue.rb +5 -0
- data/lib/async/version.rb +1 -1
- data/readme.md +4 -5
- data/releases.md +4 -0
- data.tar.gz.sig +0 -0
- metadata +1 -1
- 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: efc7dde75b60834caa61f17a3f742ff7836422c0dbc8ab6dc0f67392c00bff0e
|
4
|
+
data.tar.gz: ee3ffc8bab4adc4f98c5df81dda26f74266eb12512aba815b65cab587bb280e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 239dfdc750425c0ac90abdf981faa3358593b2d4aa782897e9b7b073fddff04d631606d6bd61d60904fbdd71fb91536dddae5b63343d831a850d67d7ee9782b7
|
7
|
+
data.tar.gz: 83d4af2ab658fef715ad268cb936bbc30851948135b935191d7bdaecad45d7eef9d3f988b8c0857129d4bff0d58648724410ee16671639a7c64d718526e7a175
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/async/barrier.rb
CHANGED
@@ -43,6 +43,8 @@ module Async
|
|
43
43
|
# Execute a child task and add it to the barrier.
|
44
44
|
# @asynchronous Executes the given block concurrently.
|
45
45
|
def async(*arguments, parent: (@parent or Task.current), **options, &block)
|
46
|
+
raise "Barrier is stopped!" if @finished.closed?
|
47
|
+
|
46
48
|
waiting = nil
|
47
49
|
|
48
50
|
parent.async(*arguments, **options) do |task, *arguments|
|
@@ -50,7 +52,7 @@ module Async
|
|
50
52
|
@tasks.append(waiting)
|
51
53
|
block.call(task, *arguments)
|
52
54
|
ensure
|
53
|
-
@finished.signal(waiting)
|
55
|
+
@finished.signal(waiting) unless @finished.closed?
|
54
56
|
end
|
55
57
|
end
|
56
58
|
|
data/lib/async/queue.rb
CHANGED
@@ -32,6 +32,11 @@ module Async
|
|
32
32
|
@available = available
|
33
33
|
end
|
34
34
|
|
35
|
+
# @returns [Boolean] Whether the queue is closed.
|
36
|
+
def closed?
|
37
|
+
@closed
|
38
|
+
end
|
39
|
+
|
35
40
|
# Close the queue, causing all waiting tasks to return `nil`. Any subsequent calls to {enqueue} will raise an exception.
|
36
41
|
def close
|
37
42
|
@closed = true
|
data/lib/async/version.rb
CHANGED
data/readme.md
CHANGED
@@ -35,6 +35,10 @@ Please see the [project documentation](https://socketry.github.io/async/) for mo
|
|
35
35
|
|
36
36
|
Please see the [project releases](https://socketry.github.io/async/releases/index) for all releases.
|
37
37
|
|
38
|
+
### v2.28.1
|
39
|
+
|
40
|
+
- Fix race condition between `Async::Barrier#stop` and finish signalling.
|
41
|
+
|
38
42
|
### v2.28.0
|
39
43
|
|
40
44
|
- Use `Traces.current_context` and `Traces.with_context` for better integration with OpenTelemetry.
|
@@ -83,11 +87,6 @@ Please see the [project releases](https://socketry.github.io/async/releases/inde
|
|
83
87
|
- `Async::Wrapper` which was previously deprecated, is now removed.
|
84
88
|
- [Flexible Timeouts](https://socketry.github.io/async/releases/index#flexible-timeouts)
|
85
89
|
|
86
|
-
### v2.23.0
|
87
|
-
|
88
|
-
- Rename `ASYNC_SCHEDULER_DEFAULT_WORKER_POOL` to `ASYNC_SCHEDULER_WORKER_POOL`.
|
89
|
-
- [Fiber Stall Profiler](https://socketry.github.io/async/releases/index#fiber-stall-profiler)
|
90
|
-
|
91
90
|
## See Also
|
92
91
|
|
93
92
|
- [async-http](https://github.com/socketry/async-http) — Asynchronous HTTP client/server.
|
data/releases.md
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|