async 2.39.0 → 2.40.0

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: 1d8427e86e8ab22c81e41dd6e7df7bd79087e3fa72ce786f07ae7b65d9d94545
4
- data.tar.gz: 30e9e7e88b211aa21afe844e3f9510b5af39d2b4af1d97710ce533f581b5c57b
3
+ metadata.gz: 58621f01c092a84a7cf528ed883d25b167fbc9be35cb85547b6f7f4d744d4f92
4
+ data.tar.gz: 2543abb1cf45a52ba369af6e86aa6c93c29d9ece5dda28f3a846d28f16a49cb0
5
5
  SHA512:
6
- metadata.gz: 337694b65547afc0d4c1568a02c0c08d03d0d70a8b2319b9b9a77660ad9f37c82ff3ab49a3856ebee477657df6b254d62e59ca6b31e9312484c02e696deab007
7
- data.tar.gz: e9bc3a1a27f9ba9ea6004dee40df9b385d7959c30e7059521805e91d1f64e9ed16bbc0920b4eb3b1dae8a727ab52ed8258f95bb2605e219f311920bf3fe2b031
6
+ metadata.gz: f2696102d8dbfa20b3f55ebeb772f5c536ab20b160383ab3d5a6b42a8b402e674fc4b10115fb20be45537e33e615d971f00b1d9b8a43611ab6b6bf64fa163351
7
+ data.tar.gz: 38ec316c57fe4bf60447b6e6406d41acfe0eded9d6f2ed8e6d64e221b08bf75d4e6e3110969d469ab37518116b50d0a7e65021ce896fb078fe8871a3fb9675ff
checksums.yaml.gz.sig CHANGED
Binary file
@@ -32,6 +32,11 @@ module Async
32
32
  !self.empty?
33
33
  end
34
34
 
35
+ # @returns [Integer] Number of fibers waiting on this condition.
36
+ def waiting_count
37
+ @ready.num_waiting
38
+ end
39
+
35
40
  # Signal to a given task that it should resume operations.
36
41
  # @parameter value [Object | Nil] The value to return to the waiting fibers.
37
42
  def signal(value = nil)
data/lib/async/version.rb CHANGED
@@ -5,5 +5,5 @@
5
5
 
6
6
  # @namespace
7
7
  module Async
8
- VERSION = "2.39.0"
8
+ VERSION = "2.40.0"
9
9
  end
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.40.0
39
+
40
+ - Introduce `Async::Condition#waiting_count`. This allows you to see how many tasks are currently waiting on the condition, which can be useful for debugging and monitoring purposes.
41
+
38
42
  ### v2.39.0
39
43
 
40
44
  - `Async::Barrier#wait` now returns the number of tasks that were waited for, or `nil` if there were no tasks to wait for. This provides better feedback about the operation, and allows you to know how many tasks were involved in the wait.
@@ -75,10 +79,6 @@ Please see the [project releases](https://socketry.github.io/async/releases/inde
75
79
 
76
80
  - `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.
77
81
 
78
- ### v2.34.0
79
-
80
- - [`Kernel::Barrier` Convenience Interface](https://socketry.github.io/async/releases/index#kernel::barrier-convenience-interface)
81
-
82
82
  ## See Also
83
83
 
84
84
  - [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.40.0
4
+
5
+ - Introduce `Async::Condition#waiting_count`. This allows you to see how many tasks are currently waiting on the condition, which can be useful for debugging and monitoring purposes.
6
+
3
7
  ## v2.39.0
4
8
 
5
9
  - `Async::Barrier#wait` now returns the number of tasks that were waited for, or `nil` if there were no tasks to wait for. This provides better feedback about the operation, and allows you to know how many tasks were involved in the wait.
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.39.0
4
+ version: 2.40.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -216,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
216
  - !ruby/object:Gem::Version
217
217
  version: '0'
218
218
  requirements: []
219
- rubygems_version: 3.6.9
219
+ rubygems_version: 4.0.10
220
220
  specification_version: 4
221
221
  summary: A concurrency framework for Ruby.
222
222
  test_files: []
metadata.gz.sig CHANGED
Binary file