async-pool 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/async/pool/controller.rb +5 -5
- data/lib/async/pool/resource.rb +1 -1
- data/lib/async/pool/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d128b17bceefb18481cc504c50770ac4ed5954f00d0d1bf2c6081180c73cb67
|
4
|
+
data.tar.gz: 4a32a80b5066638e1b0a02a5b7683d6c2a20c13c89d7d42cacd8c30104cf5749
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e310c01ee548452e4eeec3cc40bd1b1e3a6e4ec48534bf84648581353fed366cd0a2c8a7acaa872b41d038c441287c5c7154fc3650d47e4f11eb3a462fa2f8c
|
7
|
+
data.tar.gz: 0ddbf97821d02ac53a872974f3168603d63148be6c444839d0676a4d73a5bc264246cb2a22814528777924b05529af090d4d3b5571130fe8b090f253abb4ca33
|
@@ -18,7 +18,7 @@
|
|
18
18
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
19
|
# THE SOFTWARE.
|
20
20
|
|
21
|
-
require '
|
21
|
+
require 'console/logger'
|
22
22
|
|
23
23
|
require 'async'
|
24
24
|
require 'async/notification'
|
@@ -157,7 +157,7 @@ module Async
|
|
157
157
|
end
|
158
158
|
|
159
159
|
def retire(resource)
|
160
|
-
|
160
|
+
Console.logger.debug(self) {"Retire #{resource}"}
|
161
161
|
|
162
162
|
@resources.delete(resource)
|
163
163
|
|
@@ -207,7 +207,7 @@ module Async
|
|
207
207
|
end
|
208
208
|
|
209
209
|
def reuse(resource)
|
210
|
-
|
210
|
+
Console.logger.debug(self) {"Reuse #{resource}"}
|
211
211
|
usage = @resources[resource]
|
212
212
|
|
213
213
|
if usage.zero?
|
@@ -237,7 +237,7 @@ module Async
|
|
237
237
|
@notification.wait
|
238
238
|
end
|
239
239
|
|
240
|
-
|
240
|
+
Console.logger.debug(self) {"Wait for resource -> #{resource}"}
|
241
241
|
|
242
242
|
# if resource.concurrency > 1
|
243
243
|
# @notification.signal
|
@@ -288,7 +288,7 @@ module Async
|
|
288
288
|
end
|
289
289
|
|
290
290
|
if @limit.nil? or @resources.size < @limit
|
291
|
-
|
291
|
+
Console.logger.debug(self) {"No available resources, allocating new one..."}
|
292
292
|
|
293
293
|
return create_resource
|
294
294
|
end
|
data/lib/async/pool/resource.rb
CHANGED
data/lib/async/pool/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async-pool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '0'
|
140
140
|
requirements: []
|
141
|
-
rubygems_version: 3.
|
141
|
+
rubygems_version: 3.2.3
|
142
142
|
signing_key:
|
143
143
|
specification_version: 4
|
144
144
|
summary: A singleplex and multiplex resource pool for implementing robust clients.
|