async 2.31.0 → 2.32.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: 2021787bfa001830a1a65e77ca0162349f4b7c21206077a8583f7cb81268a6b4
4
- data.tar.gz: af5adae74c2b6e31df15e8885f7f5cad8f18090390d386c8d6373cebca5d1be7
3
+ metadata.gz: 5a816b65e2cdf3f1f9ee99d421b32f13ed00c858bfa2b1ff0f814cf33c9dd470
4
+ data.tar.gz: 85dc9dfad110e4ae2f0d4db45db9b1f941b797891f945da1caaa302df233f813
5
5
  SHA512:
6
- metadata.gz: 27db90ffb96b0b179a311023e73f02837e668a81c7979406b1becf1278f2af8af0aebf24947748feac6b5ba9da0774073d0ae5925e747b7a3c0eb78803ef83c2
7
- data.tar.gz: 14328112f76c82aa10aff761e23897dec82ae7512a6c5fd72a4f3708c9a828f2d53538a22e49abecfd9bdf30e243c63bb7f4c2feccd088daf208143a77d756c2
6
+ metadata.gz: e6cf114ad81e9eb511504ed44b719f9838ad84623fea14aab43acd531a9d8493b92eb0a24a49bb410670c0be82c8de5617280f39e984f1d9477c4828d96d2fc5
7
+ data.tar.gz: 2acb3e1516b2670a57cb717713d882f9d75807864924bf7aa691aa82cd5406a2b273c7aa813a30037a3dabce338095eb7faa5efff8f5f5b56290a07b3b0927b5
checksums.yaml.gz.sig CHANGED
Binary file
@@ -102,12 +102,15 @@ module Async
102
102
  end
103
103
 
104
104
  # @returns [Integer] The number of fibers waiting to dequeue.
105
- def waiting
105
+ def waiting_count
106
106
  @mutex.synchronize do
107
107
  @waiting.size
108
108
  end
109
109
  end
110
110
 
111
+ # @deprecated Use {#waiting_count} instead.
112
+ alias waiting waiting_count
113
+
111
114
  # Add an item to the queue.
112
115
  #
113
116
  # @parameter item [Object] The item to add to the queue.
data/lib/async/queue.rb CHANGED
@@ -53,6 +53,11 @@ module Async
53
53
  @delegate.empty?
54
54
  end
55
55
 
56
+ # @returns [Integer] The number of tasks waiting for an item.
57
+ def waiting_count
58
+ @delegate.num_waiting
59
+ end
60
+
56
61
  # Add an item to the queue.
57
62
  def push(item)
58
63
  @delegate.push(item)
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.31.0"
7
+ VERSION = "2.32.0"
8
8
  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.32.0
39
+
40
+ - Introduce `Queue#waiting_count` and `PriorityQueue#waiting_count`. Generally for statistics/testing purposes only.
41
+
38
42
  ### v2.31.0
39
43
 
40
44
  - Introduce `Async::Deadline` for precise timeout management in compound operations.
@@ -80,11 +84,6 @@ This release introduces thread-safety as a core concept of Async. Many core clas
80
84
 
81
85
  - Updated documentation and agent context.
82
86
 
83
- ### v2.27.0
84
-
85
- - `Async::Task#stop` supports an optional `cause:` argument (that defaults to `$!`), which allows you to specify the cause (exception) for stopping the task.
86
- - Add thread-safety agent context.
87
-
88
87
  ## See Also
89
88
 
90
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.32.0
4
+
5
+ - Introduce `Queue#waiting_count` and `PriorityQueue#waiting_count`. Generally for statistics/testing purposes only.
6
+
3
7
  ## v2.31.0
4
8
 
5
9
  - Introduce `Async::Deadline` for precise timeout management in compound operations.
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.31.0
4
+ version: 2.32.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -38,7 +38,6 @@ authors:
38
38
  - Sokolov Yura
39
39
  - Stefan Wrobel
40
40
  - Trevor Turk
41
- autorequire:
42
41
  bindir: bin
43
42
  cert_chain:
44
43
  - |
@@ -70,7 +69,7 @@ cert_chain:
70
69
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
71
70
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
72
71
  -----END CERTIFICATE-----
73
- date: 2025-09-08 00:00:00.000000000 Z
72
+ date: 1980-01-02 00:00:00.000000000 Z
74
73
  dependencies:
75
74
  - !ruby/object:Gem::Dependency
76
75
  name: console
@@ -142,8 +141,6 @@ dependencies:
142
141
  - - "~>"
143
142
  - !ruby/object:Gem::Version
144
143
  version: '0.18'
145
- description:
146
- email:
147
144
  executables: []
148
145
  extensions: []
149
146
  extra_rdoc_files: []
@@ -199,7 +196,6 @@ metadata:
199
196
  documentation_uri: https://socketry.github.io/async/
200
197
  funding_uri: https://github.com/sponsors/ioquatix/
201
198
  source_code_uri: https://github.com/socketry/async.git
202
- post_install_message:
203
199
  rdoc_options: []
204
200
  require_paths:
205
201
  - lib
@@ -214,8 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
214
210
  - !ruby/object:Gem::Version
215
211
  version: '0'
216
212
  requirements: []
217
- rubygems_version: 3.5.22
218
- signing_key:
213
+ rubygems_version: 3.6.9
219
214
  specification_version: 4
220
215
  summary: A concurrency framework for Ruby.
221
216
  test_files: []
metadata.gz.sig CHANGED
Binary file