async-limiter 1.3.1 → 1.4.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: 5b8fe52d0adb39187c467e5a9195df3fc974cdad0c66e20ca4fbb8f2331e108a
4
- data.tar.gz: 65aee35742f72694b2a1c1e4d34b41ee0d6e03eedc0f82029dbac31d042a1ad1
3
+ metadata.gz: fb0c5c05d9810ad2fa9552b2ef47a8de1a3f7a6a0d3d7b5ed06966123d3aec4d
4
+ data.tar.gz: 30515013abce6931c53c67cbec22aab86407bd540169bcf66d39be1c97b3e6e3
5
5
  SHA512:
6
- metadata.gz: 575d83be39d544535c060e113934f147e94a81f97423b3207036610edc7b8e5a230dd46301e7e20253cbd477cf1ef2ba8ead19dc610a465665c10238c5357090
7
- data.tar.gz: 033f5f5b7063c908fb250198789e053c02b512e9c04e1d56fe8ac01486c93030df7dc7046cf4923cdb2f3282c8f1ad066f97ed8319f6061ba9f1a5a275b9abda
6
+ metadata.gz: cc2899bf484bbdc536ec30198d306357799e9f877c731b90ca47547690f95795b6ee757b3186ba73479a3b02dfb2ef75f7b6dc51ff1d24e2689284c6581aaf77
7
+ data.tar.gz: 1fca09443942de54eeec4c16c2b0b6612be2fd7fc1be2efba01543cd720f4c4e055cf75cb37746ffc806fd8f7fbfe68cdf35592a65d9499ec6b7beb003305cd9
@@ -30,8 +30,10 @@ module Async
30
30
  end
31
31
  end
32
32
 
33
- def sync(*queue_args, &block)
34
- acquire(*queue_args, &block)
33
+ def sync(*queue_args)
34
+ acquire(*queue_args) do
35
+ yield(@parent || Task.current)
36
+ end
35
37
  end
36
38
 
37
39
  def acquire(*queue_args)
@@ -27,8 +27,10 @@ module Async
27
27
  end
28
28
  end
29
29
 
30
- def sync(*queue_args, &block)
31
- acquire(*queue_args, &block)
30
+ def sync(*queue_args)
31
+ acquire(*queue_args) do
32
+ yield(@parent || Task.current)
33
+ end
32
34
  end
33
35
 
34
36
  def acquire
@@ -1,5 +1,5 @@
1
1
  module Async
2
2
  module Limiter
3
- VERSION = "1.3.1"
3
+ VERSION = "1.4.0"
4
4
  end
5
5
  end
@@ -56,8 +56,10 @@ module Async
56
56
  end
57
57
  end
58
58
 
59
- def sync(*queue_args, &block)
60
- acquire(*queue_args, &block)
59
+ def sync(*queue_args)
60
+ acquire(*queue_args) do
61
+ yield(@parent || Task.current)
62
+ end
61
63
  end
62
64
 
63
65
  def acquire(*queue_args)
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.3.1
4
+ version: 1.4.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 00:00:00.000000000 Z
11
+ date: 2020-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async