async 1.22.0 → 1.22.1

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: 4fa7e7ae29e8bff86757e97d1f63bb5fd297caa79f97b5e4ccdc1f4568d65609
4
- data.tar.gz: 17239cfec1b3b5062fdf6745b7708ebbdd9f39c63199dc33cc6495362da016ca
3
+ metadata.gz: 54242c72b2d813b19ca5720e42810fed147dc8b287a541d937b4b5b269d21853
4
+ data.tar.gz: 994b539a0c57f1d88dc9fbe1337f6d7757d042e92b617bff6078b253dced5194
5
5
  SHA512:
6
- metadata.gz: 18566e7d62eca30c72491cc06f633baa1f2b027fbb474f7bb226d0c5ea09cc095e06b3f2943470f378d98a2174ff8e0b4d7875643f3abba751fe69c76e3f6657
7
- data.tar.gz: 12aed7ad107c756e90292a2179336441205d66a4f457dcf1d55e5655d9bc361753a9b4deb48c644104ca5d349610a1eb33773e995c91a7e2b92a71c97df3a0cd
6
+ metadata.gz: 5e4b6ac679779d60c72a379534ac3b83adb1e9c8633afcc3aba4679cc5f6d4491572fde39ab663cc170ae47db33b1cfbbe1a7e3611be87427224372c65853629
7
+ data.tar.gz: 863fc5ed61d8380698ab6ed48d6b7f738708bb408157d6de4d4cd58b36d3022db91dfa6e295e5eb547e71bbce17867767adc1467f5ca966bd13cf4a078aabc07
@@ -30,12 +30,12 @@ module Async
30
30
  # All tasks which have been invoked into the barrier.
31
31
  attr :tasks
32
32
 
33
- def async(*args, parent: Task.current, **options, &block)
34
- task = parent.async(*args, **options, &block)
33
+ def async(*args, task: Task.current, **options, &block)
34
+ subtask = task.async(*args, **options, &block)
35
35
 
36
- @tasks << task
36
+ @tasks << subtask
37
37
 
38
- return task
38
+ return subtask
39
39
  end
40
40
 
41
41
  def empty?
@@ -47,14 +47,14 @@ module Async
47
47
  end
48
48
 
49
49
  # Run an async task. Will wait until the semaphore is ready until spawning and running the task.
50
- def async(*args, parent: Task.current, **options)
50
+ def async(*args, task: Task.current, **options)
51
51
  wait
52
52
 
53
- parent.async(**options) do |task|
53
+ task.async(**options) do |subtask|
54
54
  @count += 1
55
55
 
56
56
  begin
57
- yield task, *args
57
+ yield subtask, *args
58
58
  ensure
59
59
  self.release
60
60
  end
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Async
22
- VERSION = "1.22.0"
22
+ VERSION = "1.22.1"
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.22.0
4
+ version: 1.22.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-08 00:00:00.000000000 Z
11
+ date: 2019-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nio4r