async 2.16.1 → 2.17.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: cd3699fb686c1acc86c39923b81f946f30be577b19eedde83ccb18c156490bfa
4
- data.tar.gz: 27f7af6e0106d94fc8d0a6da188d6c923bc9afce09a32fddad1258367f9d683c
3
+ metadata.gz: a017a6f3304bf910379aeb0f16a40daa7fce7a3de0a3e56c97a359879a3910d1
4
+ data.tar.gz: '09a048a8b24b6779d23540f85ba8e5a1d6317d9cfc87f91e74af22960a21fd29'
5
5
  SHA512:
6
- metadata.gz: 3e3d03ffcf1b3f7f3d3a4d8f3285092e4a6a6367f91259fbc17aba628d2aa6c8dbbbdcae0093a129a4a7f942f9bcf805d29cfe4e0cd715627ec62098a0e91303
7
- data.tar.gz: 65c681adf6715d125e270b323a39db62cf91efd22628884f48131b68f639ffdd5acc69402181b33f63104a2fb648135f327b2abce8a39d366024be0ca7c30665
6
+ metadata.gz: 415e7d9d23c06c60c752bb5b1ecbc336a98bd14b01b33c08bac56e4b8062b6b64761f4fcd8a412455705fb3908b715630beda5eaec7b62e3569e33cb37d235ea
7
+ data.tar.gz: 8f31cdb2fa5aded62f174683f7a5c62589191bd9263fc9c1d07c78c319592d47f4d3eb46cf92ac0f3005dad219756d16961a6a93823564de1e0263c4f1e70cb3
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/async/queue.rb CHANGED
@@ -38,12 +38,15 @@ module Async
38
38
  end
39
39
 
40
40
  # Add an item to the queue.
41
- def <<(item)
41
+ def push(item)
42
42
  @items << item
43
43
 
44
44
  @available.signal unless self.empty?
45
45
  end
46
46
 
47
+ # Compatibility with {::Queue#push}.
48
+ alias << push
49
+
47
50
  # Add multiple items to the queue.
48
51
  def enqueue(*items)
49
52
  @items.concat(items)
@@ -60,6 +63,9 @@ module Async
60
63
  @items.shift
61
64
  end
62
65
 
66
+ # Compatibility with {::Queue#pop}.
67
+ alias pop dequeue
68
+
63
69
  # Process each item in the queue.
64
70
  #
65
71
  # @asynchronous Executes the given block concurrently for each item.
data/lib/async/version.rb CHANGED
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2017-2024, by Samuel Williams.
5
5
 
6
6
  module Async
7
- VERSION = "2.16.1"
7
+ VERSION = "2.17.0"
8
8
  end
data/lib/kernel/async.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2022, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
6
  require_relative "../async/reactor"
7
7
 
data/lib/kernel/sync.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2022, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
  # Copyright, 2020, by Brian Morearty.
6
6
 
7
7
  require_relative "../async/reactor"
data/readme.md CHANGED
@@ -35,6 +35,8 @@ Please see the [project documentation](https://socketry.github.io/async/) for mo
35
35
 
36
36
  Please see the [project releases](https://socketry.github.io/async/releases/index) for all releases.
37
37
 
38
+ ### v2.17.0
39
+
38
40
  ### v2.16.0
39
41
 
40
42
  - [Better Handling of Async and Sync in Nested Fibers](https://socketry.github.io/async/releases/index#better-handling-of-async-and-sync-in-nested-fibers)
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v2.17.0
4
+
5
+ - Introduce `Async::Queue#push` and `Async::Queue#pop` for compatibility with `::Queue`.
6
+
3
7
  ## v2.16.0
4
8
 
5
9
  ### Better Handling of Async and Sync in Nested Fibers
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.16.1
4
+ version: 2.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -63,7 +63,7 @@ cert_chain:
63
63
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
64
64
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
65
65
  -----END CERTIFICATE-----
66
- date: 2024-08-26 00:00:00.000000000 Z
66
+ date: 2024-09-05 00:00:00.000000000 Z
67
67
  dependencies:
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: console
metadata.gz.sig CHANGED
Binary file