async-limiter 1.0.0 → 1.1.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: 6d203b60d1b006ce7dc199fd37dbfeac43468324a083a02a233dbf7fe1ebc61f
4
- data.tar.gz: f7cd17453e047205743648458058f30365d795514fba956dca1aa910ab34816e
3
+ metadata.gz: 7cdf40ab309d5d7b7ca00fb0dcaedb33b70a1fca2d64beda3372315e15c010cb
4
+ data.tar.gz: 11d3b4dfb522dd797fceccf3584d1a8cf09754242243dd9691fde4e21f3135d5
5
5
  SHA512:
6
- metadata.gz: 2721ba28df1d8aca742ba974ace3146d136734e9482c39429957dd0ff9022843eef5dc6bdbda9c9aa60017c019ab2011907a31a6d30d8a16f7392b2c70daf04a
7
- data.tar.gz: 7ea2cbb70d1f192d947d42594711fdf37da8f86a56d624925ec3b8fdb31957248ecbb1b945f62f7c4dfc755c947ede0ec65f8035c2806fd942ebd60ab430194d
6
+ metadata.gz: b24f90a04704a5bcb01147d801b00ec58b96f22d853a7edbde6357f115fc3e903b57602609c9c2be8e622908eb75e1f6cfd21919e555616b6f6178d2380f55e7
7
+ data.tar.gz: 29c23c6e2868214742540be7e9aeb4678eb9f9ff9dd4625e8eab41f129db05b459f1e4a053245015876fc9086b6cadfc78159890f2493e06ca6824ab70f708c9
@@ -8,10 +8,10 @@ module Async
8
8
 
9
9
  attr_reader :limit
10
10
 
11
- def initialize(limit = 1, parent: nil)
11
+ def initialize(limit = 1, parent: nil, queue: [])
12
12
  @count = 0
13
13
  @limit = limit
14
- @waiting = []
14
+ @waiting = queue
15
15
  @parent = parent
16
16
 
17
17
  validate!
@@ -1,5 +1,5 @@
1
1
  module Async
2
2
  module Limiter
3
- VERSION = "1.0.0"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -15,7 +15,7 @@ module Async
15
15
  attr_reader :lock
16
16
 
17
17
  def initialize(limit = 1, type: :fixed, window: 1, parent: nil,
18
- burstable: true, lock: true)
18
+ burstable: true, lock: true, queue: [])
19
19
  @count = 0
20
20
  @input_limit = @limit = limit
21
21
  @type = type
@@ -24,7 +24,7 @@ module Async
24
24
  @burstable = burstable
25
25
  @lock = lock
26
26
 
27
- @waiting = []
27
+ @waiting = queue
28
28
  @scheduler_task = nil
29
29
 
30
30
  @window_frame_start_time = NULL_TIME
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.0.0
4
+ version: 1.1.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-10 00:00:00.000000000 Z
11
+ date: 2020-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async