async-limiter 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/async/limiter/version.rb +1 -1
- data/lib/async/limiter/window.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89371390667823819a23be2b9b32fa67835de748ed46e456e3bef72af1086f9c
|
4
|
+
data.tar.gz: 2cb73676f8f6d2f78d9eb7dfe5f7842076fc2121be674ce13f61ba26075633a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1eb18ea438a0aa21647a7630f11cdfc0318e2b1e5b9395f9476e1c05a1865e37a4a994e0fd877bca06aa62de1ce1429662fec1b8d450b8e88bd1eb1ab90ba105
|
7
|
+
data.tar.gz: d0fb87462427dfef33c2967a594b6df029579f3bfd8afaf1f9fe6445abff60f9d147d4838c3edf9ded900488203669f3e53c04f2bde3c09edfafcd1181078148
|
data/lib/async/limiter/window.rb
CHANGED
@@ -179,6 +179,8 @@ module Async
|
|
179
179
|
def schedule(parent: @parent || Task.current)
|
180
180
|
@scheduler_task ||=
|
181
181
|
parent.async { |task|
|
182
|
+
task.annotate("scheduling tasks for #{self.class}.")
|
183
|
+
|
182
184
|
while @waiting.any? && !limit_blocking?
|
183
185
|
delay = [next_acquire_time - Async::Clock.now, 0].max
|
184
186
|
task.sleep(delay) if delay.positive?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async-limiter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bruno Sutic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|