async 2.35.0 → 2.35.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad14103d1146e967a38187e2d6d3d64b745b50f2f833b164c151ef53d270673e
4
- data.tar.gz: b34db7f89b4054ed33dfbd22d979060b90d939180cf3014c4aa7a5b8c3f070eb
3
+ metadata.gz: 06aeb8876caaf9a0e0b3a98bdd614bd120be679fe58ab236986d4ba1ec7a1780
4
+ data.tar.gz: 340f51025f86a4cc2b1a84cb7f1d54ff4c994b5e51273f2aad67ef8c06086af3
5
5
  SHA512:
6
- metadata.gz: 9b73a930aa37a5cb7695ca5deb66e181d80bd1b1157fbcbf711f6ff2f288c8b1294f05e32e02b68289608b1948315509c66bc541250cd14a19ed40461e283e99
7
- data.tar.gz: 82cef6a6f824e38cf4cdd24a0a6447394e5c8cb37f1c6ec606433e34aa9bd0d6495f92d3fcc290cf298ed497b3967ab9beac5f60d18849f5bcc04df7bee34a39
6
+ metadata.gz: 4279343f962f00d4b0729713ac3fc5673c756798fb50181954e74cb46989649dbb5c65403a0de425b4447fe4171412d44a2e80b8d14c01c4860603f2d916f85c
7
+ data.tar.gz: 48365bc944db68fca7ce5cd94281201e73330d2ceef5c36a0fd77801b55254a24979e0dec148a8c76b385a864f18d5a0679d983e591ca1a2038c6a1809f7ed19
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/async/promise.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2025, by Shopify Inc.
5
- # Copyright, 2025, by Samuel Williams.
5
+ # Copyright, 2025-2026, by Samuel Williams.
6
6
 
7
7
  module Async
8
8
  # A promise represents a value that will be available in the future.
@@ -86,7 +86,9 @@ module Async
86
86
 
87
87
  begin
88
88
  # Wait for resolution if not already resolved:
89
- @condition.wait(@mutex) unless @resolved
89
+ until @resolved
90
+ @condition.wait(@mutex)
91
+ end
90
92
 
91
93
  # Return value or raise exception based on resolution type:
92
94
  if @resolved == :completed
data/lib/async/version.rb CHANGED
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2017-2025, by Samuel Williams.
5
5
 
6
6
  module Async
7
- VERSION = "2.35.0"
7
+ VERSION = "2.35.1"
8
8
  end
data/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright, 2017-2025, by Samuel Williams.
3
+ Copyright, 2017-2026, by Samuel Williams.
4
4
  Copyright, 2017, by Kent Gruber.
5
5
  Copyright, 2017, by Devin Christensen.
6
6
  Copyright, 2018, by Sokolov Yura.
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.35.1
39
+
40
+ - Fix incorrect handling of spurious wakeups in `Async::Promise#wait`, which could lead to premature (incorrect) resolution of the promise.
41
+
38
42
  ### v2.35.0
39
43
 
40
44
  - `Process.fork` is now properly handled by the Async fiber scheduler, ensuring that the scheduler state is correctly reset in the child process after a fork. This prevents issues where the child process inherits the scheduler state from the parent, which could lead to unexpected behavior.
@@ -80,10 +84,6 @@ This release introduces thread-safety as a core concept of Async. Many core clas
80
84
 
81
85
  - Fix race condition between `Async::Barrier#stop` and finish signalling.
82
86
 
83
- ### v2.28.0
84
-
85
- - Use `Traces.current_context` and `Traces.with_context` for better integration with OpenTelemetry.
86
-
87
87
  ## See Also
88
88
 
89
89
  - [async-http](https://github.com/socketry/async-http) — Asynchronous HTTP client/server.
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v2.35.1
4
+
5
+ - Fix incorrect handling of spurious wakeups in `Async::Promise#wait`, which could lead to premature (incorrect) resolution of the promise.
6
+
3
7
  ## v2.35.0
4
8
 
5
9
  - `Process.fork` is now properly handled by the Async fiber scheduler, ensuring that the scheduler state is correctly reset in the child process after a fork. This prevents issues where the child process inherits the scheduler state from the parent, which could lead to unexpected behavior.
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.35.0
4
+ version: 2.35.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -213,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
213
213
  - !ruby/object:Gem::Version
214
214
  version: '0'
215
215
  requirements: []
216
- rubygems_version: 3.6.9
216
+ rubygems_version: 4.0.3
217
217
  specification_version: 4
218
218
  summary: A concurrency framework for Ruby.
219
219
  test_files: []
metadata.gz.sig CHANGED
Binary file