async-pool 0.10.2 → 0.10.3

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: 9e6e8dc07c2eb994f4dbf4080dee0fee32bd965cb10a103798673d05a6a71078
4
- data.tar.gz: 551b810930f43923d32f7236f48922311fb99e14243408e79f7d8f5f28dd3f0b
3
+ metadata.gz: 56a5ccdbbda423ade08a5f3ecbd9078cb0593ff6c0747f0abc28ab7821a1f3b7
4
+ data.tar.gz: 305a6dd845d03756c4b2a05d59fae42c1c847b693a8d8f6c1df3e146604ecc13
5
5
  SHA512:
6
- metadata.gz: 9f368abe8db1c8e04cba458cac6377d0dbd594dd78ceb1baf39f4ac8db6ca32e699525be155b828b0d8ff82e476c532548a83592bdfb7c169af749f5c06c5622
7
- data.tar.gz: aa19bcf1f837e7c1c2472afae94ccb6f0af39ad6e7520b80d09d5f99756ff0adcbf81750b53a8934620d63cd64371f8c46640af18ba1e97c72f9c737d4fad34c
6
+ metadata.gz: 6647788461e0dda6cc136f9fde08bee8a3d81d66d3f1e56720e828d85cfaa90294c234892a45173c92571c706a790d0916e6238a1cc1cdf38b462032ae45d9ff
7
+ data.tar.gz: b7496e871d2d380bf8e5f181b4c53a21cfe61995ab4626f381db354cb33fcca72410691ce9a4bf2a8ed1a267a30c94efa837c9be8a66bab6607f128847281c41
checksums.yaml.gz.sig CHANGED
Binary file
@@ -11,8 +11,6 @@ require "async"
11
11
  require "async/notification"
12
12
  require "async/semaphore"
13
13
 
14
- require "traces"
15
-
16
14
  module Async
17
15
  module Pool
18
16
  # A resource pool controller.
@@ -161,6 +159,7 @@ module Async
161
159
  retire(resource) unless processed
162
160
  end
163
161
 
162
+ # Drain the pool, closing all resources.
164
163
  def drain
165
164
  Console.debug(self, "Draining pool...", size: @resources.size)
166
165
 
@@ -170,7 +169,7 @@ module Async
170
169
  end
171
170
  end
172
171
 
173
- # Close all resources in the pool.
172
+ # Drain the pool, clear all resources, and stop the gardener.
174
173
  def close
175
174
  self.drain
176
175
 
@@ -381,59 +380,6 @@ module Async
381
380
  return create_resource
382
381
  end
383
382
  end
384
-
385
- Traces::Provider(self) do
386
- def create_resource(...)
387
- attributes = {
388
- concurrency: @guard.limit,
389
- }
390
-
391
- attributes.merge!(@tags) if @tags
392
-
393
- Traces.trace('async.pool.create', attributes: attributes) {super}
394
- end
395
-
396
- def drain(...)
397
- attributes = {
398
- size: @resources.size,
399
- }
400
-
401
- attributes.merge!(@tags) if @tags
402
-
403
- Traces.trace('async.pool.drain', attributes: attributes) {super}
404
- end
405
-
406
- def acquire(...)
407
- attributes = {
408
- size: @resources.size,
409
- limit: @limit,
410
- }
411
-
412
- attributes.merge!(@tags) if @tags
413
-
414
- Traces.trace('async.pool.acquire', attributes: attributes) {super}
415
- end
416
-
417
- def release(...)
418
- attributes = {
419
- size: @resources.size,
420
- }
421
-
422
- attributes.merge!(@tags) if @tags
423
-
424
- Traces.trace('async.pool.release', attributes: attributes) {super}
425
- end
426
-
427
- def retire(...)
428
- attributes = {
429
- size: @resources.size,
430
- }
431
-
432
- attributes.merge!(@tags) if @tags
433
-
434
- Traces.trace('async.pool.retire', attributes: attributes) {super}
435
- end
436
- end
437
383
  end
438
384
  end
439
385
  end
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Async
7
7
  module Pool
8
- VERSION = "0.10.2"
8
+ VERSION = "0.10.3"
9
9
  end
10
10
  end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2025, by Samuel Williams.
5
+
6
+ require_relative "../../../../async/pool/controller"
7
+
8
+ Traces::Provider(Async::Pool::Controller) do
9
+ def create_resource(...)
10
+ attributes = {
11
+ concurrency: @guard.limit,
12
+ }
13
+
14
+ attributes.merge!(@tags) if @tags
15
+
16
+ Traces.trace("async.pool.create", attributes: attributes) {super}
17
+ end
18
+
19
+ def drain(...)
20
+ attributes = {
21
+ size: @resources.size,
22
+ }
23
+
24
+ attributes.merge!(@tags) if @tags
25
+
26
+ Traces.trace("async.pool.drain", attributes: attributes) {super}
27
+ end
28
+
29
+ def acquire(...)
30
+ attributes = {
31
+ size: @resources.size,
32
+ limit: @limit,
33
+ }
34
+
35
+ attributes.merge!(@tags) if @tags
36
+
37
+ Traces.trace("async.pool.acquire", attributes: attributes) {super}
38
+ end
39
+
40
+ def release(...)
41
+ attributes = {
42
+ size: @resources.size,
43
+ }
44
+
45
+ attributes.merge!(@tags) if @tags
46
+
47
+ Traces.trace("async.pool.release", attributes: attributes) {super}
48
+ end
49
+
50
+ def retire(...)
51
+ attributes = {
52
+ size: @resources.size,
53
+ }
54
+
55
+ attributes.merge!(@tags) if @tags
56
+
57
+ Traces.trace("async.pool.retire", attributes: attributes) {super}
58
+ end
59
+ end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-pool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  - Olle Jonsson
9
9
  - Simon Perepelitsa
10
10
  - Thomas Morgan
11
- autorequire:
12
11
  bindir: bin
13
12
  cert_chain:
14
13
  - |
@@ -40,7 +39,7 @@ cert_chain:
40
39
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
41
40
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
42
41
  -----END CERTIFICATE-----
43
- date: 2024-11-13 00:00:00.000000000 Z
42
+ date: 2025-02-01 00:00:00.000000000 Z
44
43
  dependencies:
45
44
  - !ruby/object:Gem::Dependency
46
45
  name: async
@@ -56,22 +55,6 @@ dependencies:
56
55
  - - ">="
57
56
  - !ruby/object:Gem::Version
58
57
  version: '1.25'
59
- - !ruby/object:Gem::Dependency
60
- name: traces
61
- requirement: !ruby/object:Gem::Requirement
62
- requirements:
63
- - - ">="
64
- - !ruby/object:Gem::Version
65
- version: '0'
66
- type: :runtime
67
- prerelease: false
68
- version_requirements: !ruby/object:Gem::Requirement
69
- requirements:
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- version: '0'
73
- description:
74
- email:
75
58
  executables: []
76
59
  extensions: []
77
60
  extra_rdoc_files: []
@@ -80,6 +63,7 @@ files:
80
63
  - lib/async/pool/controller.rb
81
64
  - lib/async/pool/resource.rb
82
65
  - lib/async/pool/version.rb
66
+ - lib/traces/provider/async/pool/controller.rb
83
67
  - license.md
84
68
  - readme.md
85
69
  homepage: https://github.com/socketry/async-pool
@@ -89,7 +73,6 @@ metadata:
89
73
  documentation_uri: https://socketry.github.io/async-pool/
90
74
  funding_uri: https://github.com/sponsors/ioquatix/
91
75
  source_code_uri: https://github.com/socketry/async-pool.git
92
- post_install_message:
93
76
  rdoc_options: []
94
77
  require_paths:
95
78
  - lib
@@ -104,8 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
87
  - !ruby/object:Gem::Version
105
88
  version: '0'
106
89
  requirements: []
107
- rubygems_version: 3.5.22
108
- signing_key:
90
+ rubygems_version: 3.6.2
109
91
  specification_version: 4
110
92
  summary: A singleplex and multiplex resource pool for implementing robust clients.
111
93
  test_files: []
metadata.gz.sig CHANGED
Binary file