async 2.0.1 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +1 -0
- data/lib/async/barrier.rb +7 -21
- data/lib/async/clock.rb +2 -19
- data/lib/async/condition.rb +3 -19
- data/lib/async/node.rb +4 -19
- data/lib/async/notification.rb +2 -19
- data/lib/async/queue.rb +24 -24
- data/lib/async/reactor.rb +6 -19
- data/lib/async/scheduler.rb +7 -24
- data/lib/async/semaphore.rb +2 -19
- data/lib/async/task.rb +23 -38
- data/lib/async/variable.rb +2 -19
- data/lib/async/version.rb +3 -20
- data/lib/async/wrapper.rb +4 -20
- data/lib/async.rb +3 -19
- data/lib/kernel/async.rb +2 -19
- data/lib/kernel/sync.rb +3 -19
- data/license.md +37 -0
- data/readme.md +68 -0
- data.tar.gz.sig +0 -0
- metadata +51 -6
- metadata.gz.sig +1 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 130279c953352582553baf6b9dc32293157c02f8b9d276c0a12c5e693196a91f
|
4
|
+
data.tar.gz: bee93186f33f084170e34eb7865a21200b2bd2d023545e27b2e63123c9db9642
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13ce1034c5e0f64414a8cbefe99f429ab27572427e912c9d3d768fc8db5f18bf102c9ab3c9417c5b497a3e472f57309a2d1f034b8b220f5bee655373b0bf2c84
|
7
|
+
data.tar.gz: 4fab2993acc867b6b4b6ad40021ddf01802cfbab3d56760dca122c1bae38a864cc345ed27c60efc59394c57e9e4be967bd1611c709988b5fbdc55624ea5ab13a
|
checksums.yaml.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
�B)]
|
data/lib/async/barrier.rb
CHANGED
@@ -1,24 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2019-2022, by Samuel Williams.
|
22
5
|
|
23
6
|
require_relative 'task'
|
24
7
|
|
@@ -69,8 +52,11 @@ module Async
|
|
69
52
|
begin
|
70
53
|
task.wait
|
71
54
|
ensure
|
72
|
-
#
|
73
|
-
|
55
|
+
# We don't know for sure that the exception was due to the task completion.
|
56
|
+
unless task.running?
|
57
|
+
# Remove the task from the waiting list if it's finished:
|
58
|
+
@tasks.shift if @tasks.first == task
|
59
|
+
end
|
74
60
|
end
|
75
61
|
end
|
76
62
|
end
|
data/lib/async/clock.rb
CHANGED
@@ -1,24 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2018-2022, by Samuel Williams.
|
22
5
|
|
23
6
|
module Async
|
24
7
|
# A convenient wrapper around the internal monotonic clock.
|
data/lib/async/condition.rb
CHANGED
@@ -1,24 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2017-2022, by Samuel Williams.
|
5
|
+
# Copyright, 2017, by Kent Gruber.
|
22
6
|
|
23
7
|
require 'fiber'
|
24
8
|
require_relative 'node'
|
data/lib/async/node.rb
CHANGED
@@ -1,24 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2017-2022, by Samuel Williams.
|
5
|
+
# Copyright, 2017, by Kent Gruber.
|
6
|
+
# Copyright, 2022, by Shannon Skipper.
|
22
7
|
|
23
8
|
module Async
|
24
9
|
# A double linked list used for managing tasks.
|
data/lib/async/notification.rb
CHANGED
@@ -1,24 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2018-2022, by Samuel Williams.
|
22
5
|
|
23
6
|
require_relative 'condition'
|
24
7
|
|
data/lib/async/queue.rb
CHANGED
@@ -1,24 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2018-2022, by Samuel Williams.
|
5
|
+
# Copyright, 2019, by Ryan Musgrave.
|
6
|
+
# Copyright, 2020-2022, by Bruno Sutic.
|
22
7
|
|
23
8
|
require_relative 'notification'
|
24
9
|
|
@@ -43,14 +28,16 @@ module Async
|
|
43
28
|
@items.empty?
|
44
29
|
end
|
45
30
|
|
46
|
-
def
|
47
|
-
@items
|
31
|
+
def <<(item)
|
32
|
+
@items << item
|
48
33
|
|
49
34
|
self.signal unless self.empty?
|
50
35
|
end
|
51
36
|
|
52
|
-
def
|
53
|
-
|
37
|
+
def enqueue(*items)
|
38
|
+
@items.concat(items)
|
39
|
+
|
40
|
+
self.signal unless self.empty?
|
54
41
|
end
|
55
42
|
|
56
43
|
def dequeue
|
@@ -91,7 +78,7 @@ module Async
|
|
91
78
|
@items.size >= @limit
|
92
79
|
end
|
93
80
|
|
94
|
-
def
|
81
|
+
def <<(item)
|
95
82
|
while limited?
|
96
83
|
@full.wait
|
97
84
|
end
|
@@ -99,6 +86,19 @@ module Async
|
|
99
86
|
super
|
100
87
|
end
|
101
88
|
|
89
|
+
def enqueue *items
|
90
|
+
while !items.empty?
|
91
|
+
while limited?
|
92
|
+
@full.wait
|
93
|
+
end
|
94
|
+
|
95
|
+
available = @limit - @items.size
|
96
|
+
@items.concat(items.shift(available))
|
97
|
+
|
98
|
+
self.signal unless self.empty?
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
102
|
def dequeue
|
103
103
|
item = super
|
104
104
|
|
data/lib/async/reactor.rb
CHANGED
@@ -1,22 +1,9 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
# copies of the Software, and to permit persons to whom the Software is
|
8
|
-
# furnished to do so, subject to the following conditions:
|
9
|
-
#
|
10
|
-
# The above copyright notice and this permission notice shall be included in
|
11
|
-
# all copies or substantial portions of the Software.
|
12
|
-
#
|
13
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2017-2022, by Samuel Williams.
|
5
|
+
# Copyright, 2017, by Kent Gruber.
|
6
|
+
# Copyright, 2018, by Sokolov Yura.
|
20
7
|
|
21
8
|
require_relative 'scheduler'
|
22
9
|
|
data/lib/async/scheduler.rb
CHANGED
@@ -1,22 +1,9 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
# copies of the Software, and to permit persons to whom the Software is
|
8
|
-
# furnished to do so, subject to the following conditions:
|
9
|
-
#
|
10
|
-
# The above copyright notice and this permission notice shall be included in
|
11
|
-
# all copies or substantial portions of the Software.
|
12
|
-
#
|
13
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2020-2022, by Samuel Williams.
|
5
|
+
# Copyright, 2020, by Jun Jiang.
|
6
|
+
# Copyright, 2021, by Julien Portalier.
|
20
7
|
|
21
8
|
require_relative 'clock'
|
22
9
|
require_relative 'task'
|
@@ -102,11 +89,7 @@ module Async
|
|
102
89
|
end
|
103
90
|
|
104
91
|
def resume(fiber, *arguments)
|
105
|
-
|
106
|
-
@selector.resume(fiber, *arguments)
|
107
|
-
else
|
108
|
-
@selector.push(fiber)
|
109
|
-
end
|
92
|
+
@selector.resume(fiber, *arguments)
|
110
93
|
end
|
111
94
|
|
112
95
|
# Invoked when a fiber tries to perform a blocking operation which cannot continue. A corresponding call {unblock} must be performed to allow this fiber to continue.
|
data/lib/async/semaphore.rb
CHANGED
@@ -1,24 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2018-2022, by Samuel Williams.
|
22
5
|
|
23
6
|
module Async
|
24
7
|
# A synchronization primitive, which limits access to a given resource.
|
data/lib/async/task.rb
CHANGED
@@ -1,24 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2017-2022, by Samuel Williams.
|
5
|
+
# Copyright, 2017, by Kent Gruber.
|
6
|
+
# Copyright, 2017, by Devin Christensen.
|
7
|
+
# Copyright, 2020, by Patrik Wenger.
|
22
8
|
|
23
9
|
require 'fiber'
|
24
10
|
|
@@ -117,7 +103,9 @@ module Async
|
|
117
103
|
if @status == :initialized
|
118
104
|
@status = :running
|
119
105
|
|
120
|
-
schedule
|
106
|
+
schedule do
|
107
|
+
@block.call(self, *arguments)
|
108
|
+
end
|
121
109
|
else
|
122
110
|
raise RuntimeError, "Task already running!"
|
123
111
|
end
|
@@ -163,7 +151,7 @@ module Async
|
|
163
151
|
if self.running?
|
164
152
|
if self.current?
|
165
153
|
if later
|
166
|
-
Fiber.scheduler.push
|
154
|
+
Fiber.scheduler.push(Stop::Later.new(self))
|
167
155
|
else
|
168
156
|
raise Stop, "Stopping current task!"
|
169
157
|
end
|
@@ -171,7 +159,7 @@ module Async
|
|
171
159
|
begin
|
172
160
|
Fiber.scheduler.raise(@fiber, Stop)
|
173
161
|
rescue FiberError
|
174
|
-
Fiber.scheduler.push
|
162
|
+
Fiber.scheduler.push(Stop::Later.new(self))
|
175
163
|
end
|
176
164
|
end
|
177
165
|
else
|
@@ -206,17 +194,13 @@ module Async
|
|
206
194
|
# Whether we can remove this node from the reactor graph.
|
207
195
|
# @returns [Boolean]
|
208
196
|
def finished?
|
209
|
-
super && @
|
197
|
+
super && @fiber.nil?
|
210
198
|
end
|
211
199
|
|
212
200
|
def failed?
|
213
201
|
@status == :failed
|
214
202
|
end
|
215
203
|
|
216
|
-
def stopping?
|
217
|
-
@status == :stopping
|
218
|
-
end
|
219
|
-
|
220
204
|
def stopped?
|
221
205
|
@status == :stopped
|
222
206
|
end
|
@@ -228,18 +212,19 @@ module Async
|
|
228
212
|
private
|
229
213
|
|
230
214
|
# This is a very tricky aspect of tasks to get right. I've modelled it after `Thread` but it's slightly different in that the exception can propagate back up through the reactor. If the user writes code which raises an exception, that exception should always be visible, i.e. cause a failure. If it's not visible, such code fails silently and can be very difficult to debug.
|
231
|
-
|
232
|
-
def fail!(exception = nil, propagate = true)
|
215
|
+
def fail!(exception = false, propagate = true)
|
233
216
|
@status = :failed
|
234
217
|
@result = exception
|
235
218
|
|
236
|
-
if
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
219
|
+
if exception
|
220
|
+
if propagate
|
221
|
+
raise exception
|
222
|
+
elsif @finished.nil?
|
223
|
+
# If no one has called wait, we log this as a warning:
|
224
|
+
Console.logger.warn(self, "Task may have ended with unhandled exception.", exception)
|
225
|
+
else
|
226
|
+
Console.logger.debug(self, exception)
|
227
|
+
end
|
243
228
|
end
|
244
229
|
end
|
245
230
|
|
@@ -250,12 +235,12 @@ module Async
|
|
250
235
|
stop_children(true)
|
251
236
|
end
|
252
237
|
|
253
|
-
def schedule(
|
238
|
+
def schedule(&block)
|
254
239
|
@fiber = Fiber.new do
|
255
240
|
set!
|
256
241
|
|
257
242
|
begin
|
258
|
-
@result =
|
243
|
+
@result = yield
|
259
244
|
@status = :complete
|
260
245
|
# Console.logger.debug(self) {"Task was completed with #{@children.size} children!"}
|
261
246
|
rescue Stop
|
data/lib/async/variable.rb
CHANGED
@@ -1,24 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2021-2022, by Samuel Williams.
|
22
5
|
|
23
6
|
require_relative 'condition'
|
24
7
|
|
data/lib/async/version.rb
CHANGED
@@ -1,25 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2017-2022, by Samuel Williams.
|
22
5
|
|
23
6
|
module Async
|
24
|
-
VERSION = "2.0
|
7
|
+
VERSION = "2.1.0"
|
25
8
|
end
|
data/lib/async/wrapper.rb
CHANGED
@@ -1,24 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2017-2022, by Samuel Williams.
|
5
|
+
# Copyright, 2017, by Kent Gruber.
|
22
6
|
|
23
7
|
module Async
|
24
8
|
# Represents an asynchronous IO within a reactor.
|
@@ -64,7 +48,7 @@ module Async
|
|
64
48
|
# Wait fo the io to become either readable or writable.
|
65
49
|
# @parameter duration [Float] timeout after the given duration if not `nil`.
|
66
50
|
def wait_any(timeout = @timeout)
|
67
|
-
@io.
|
51
|
+
@io.to_io.wait(::IO::READABLE|::IO::WRITABLE|::IO::PRIORITY, timeout) or raise TimeoutError
|
68
52
|
end
|
69
53
|
|
70
54
|
# Close the io and monitor.
|
data/lib/async.rb
CHANGED
@@ -1,24 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2017-2022, by Samuel Williams.
|
5
|
+
# Copyright, 2020, by Salim Semaoune.
|
22
6
|
|
23
7
|
require_relative "async/version"
|
24
8
|
require_relative "async/reactor"
|
data/lib/kernel/async.rb
CHANGED
@@ -1,24 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2019-2022, by Samuel Williams.
|
22
5
|
|
23
6
|
require_relative "../async/reactor"
|
24
7
|
|
data/lib/kernel/sync.rb
CHANGED
@@ -1,24 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2019-2022, by Samuel Williams.
|
5
|
+
# Copyright, 2020, by Brian Morearty.
|
22
6
|
|
23
7
|
require_relative "../async/reactor"
|
24
8
|
|
data/license.md
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# MIT License
|
2
|
+
|
3
|
+
Copyright, 2017-2022, by Samuel Williams.
|
4
|
+
Copyright, 2017, by Kent Gruber.
|
5
|
+
Copyright, 2017, by Devin Christensen.
|
6
|
+
Copyright, 2018, by Sokolov Yura.
|
7
|
+
Copyright, 2018, by Jiang Jinyang.
|
8
|
+
Copyright, 2019, by Jeremy Jung.
|
9
|
+
Copyright, 2019, by Ryan Musgrave.
|
10
|
+
Copyright, 2020, by Olle Jonsson.
|
11
|
+
Copyright, 2020, by Salim Semaoune.
|
12
|
+
Copyright, 2020, by Brian Morearty.
|
13
|
+
Copyright, 2020, by Stefan Wrobel.
|
14
|
+
Copyright, 2020, by Patrik Wenger.
|
15
|
+
Copyright, 2020, by Ken Muryoi.
|
16
|
+
Copyright, 2020, by Jun Jiang.
|
17
|
+
Copyright, 2020-2022, by Bruno Sutic.
|
18
|
+
Copyright, 2021, by Julien Portalier.
|
19
|
+
Copyright, 2022, by Shannon Skipper.
|
20
|
+
|
21
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
22
|
+
of this software and associated documentation files (the "Software"), to deal
|
23
|
+
in the Software without restriction, including without limitation the rights
|
24
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
25
|
+
copies of the Software, and to permit persons to whom the Software is
|
26
|
+
furnished to do so, subject to the following conditions:
|
27
|
+
|
28
|
+
The above copyright notice and this permission notice shall be included in all
|
29
|
+
copies or substantial portions of the Software.
|
30
|
+
|
31
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
32
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
33
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
34
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
35
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
36
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
37
|
+
SOFTWARE.
|
data/readme.md
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
# ![Async](logo.svg)
|
2
|
+
|
3
|
+
Async is a composable asynchronous I/O framework for Ruby based on [io-event](https://github.com/socketry/io-event) and [timers](https://github.com/socketry/timers).
|
4
|
+
|
5
|
+
> "Lately I've been looking into `async`, as one of my projects – [tus-ruby-server](https://github.com/janko/tus-ruby-server) – would really benefit from non-blocking I/O. It's really beautifully designed." *– [janko](https://github.com/janko)*
|
6
|
+
|
7
|
+
[![Development Status](https://github.com/socketry/async/workflows/Test/badge.svg)](https://github.com/socketry/async/actions?workflow=Test)
|
8
|
+
|
9
|
+
## Features
|
10
|
+
|
11
|
+
- Scalable event-driven I/O for Ruby. Thousands of clients per process\!
|
12
|
+
- Light weight fiber-based concurrency. No need for callbacks\!
|
13
|
+
- Multi-thread/process containers for parallelism.
|
14
|
+
- Growing eco-system of event-driven components.
|
15
|
+
|
16
|
+
## Usage
|
17
|
+
|
18
|
+
Please see the [project documentation](https://socketry.github.io/async).
|
19
|
+
|
20
|
+
## Contributing
|
21
|
+
|
22
|
+
We welcome contributions to this project.
|
23
|
+
|
24
|
+
1. Fork it.
|
25
|
+
2. Create your feature branch (`git checkout -b my-new-feature`).
|
26
|
+
3. Commit your changes (`git commit -am 'Add some feature'`).
|
27
|
+
4. Push to the branch (`git push origin my-new-feature`).
|
28
|
+
5. Create new Pull Request.
|
29
|
+
|
30
|
+
## See Also
|
31
|
+
|
32
|
+
- [async-io](https://github.com/socketry/async-io) — Asynchronous networking and sockets.
|
33
|
+
- [async-http](https://github.com/socketry/async-http) — Asynchronous HTTP client/server.
|
34
|
+
- [async-process](https://github.com/socketry/async-process) — Asynchronous process spawning/waiting.
|
35
|
+
- [async-websocket](https://github.com/socketry/async-websocket) — Asynchronous client and server websockets.
|
36
|
+
- [async-dns](https://github.com/socketry/async-dns) — Asynchronous DNS resolver and server.
|
37
|
+
- [async-rspec](https://github.com/socketry/async-rspec) — Shared contexts for running async specs.
|
38
|
+
|
39
|
+
### Projects Using Async
|
40
|
+
|
41
|
+
- [ciri](https://github.com/ciri-ethereum/ciri) — An Ethereum implementation written in Ruby.
|
42
|
+
- [falcon](https://github.com/socketry/falcon) — A rack compatible server built on top of `async-http`.
|
43
|
+
- [rubydns](https://github.com/ioquatix/rubydns) — A easy to use Ruby DNS server.
|
44
|
+
- [slack-ruby-bot](https://github.com/slack-ruby/slack-ruby-bot) — A client for making slack bots.
|
45
|
+
|
46
|
+
## License
|
47
|
+
|
48
|
+
Released under the MIT license.
|
49
|
+
|
50
|
+
Copyright, 2017, by [Samuel G. D. Williams](http://www.codeotaku.com).
|
51
|
+
|
52
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
53
|
+
of this software and associated documentation files (the "Software"), to deal
|
54
|
+
in the Software without restriction, including without limitation the rights
|
55
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
56
|
+
copies of the Software, and to permit persons to whom the Software is
|
57
|
+
furnished to do so, subject to the following conditions:
|
58
|
+
|
59
|
+
The above copyright notice and this permission notice shall be included in
|
60
|
+
all copies or substantial portions of the Software.
|
61
|
+
|
62
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
63
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
64
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
65
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
66
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
67
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
68
|
+
THE SOFTWARE.
|
data.tar.gz.sig
ADDED
Binary file
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
|
-
- Devin Christensen
|
9
8
|
- Bruno Sutic
|
9
|
+
- Devin Christensen
|
10
10
|
- Jeremy Jung
|
11
11
|
- Kent Gruber
|
12
12
|
- jeremyjung
|
@@ -24,8 +24,37 @@ authors:
|
|
24
24
|
- muryoimpl
|
25
25
|
autorequire:
|
26
26
|
bindir: bin
|
27
|
-
cert_chain:
|
28
|
-
|
27
|
+
cert_chain:
|
28
|
+
- |
|
29
|
+
-----BEGIN CERTIFICATE-----
|
30
|
+
MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11
|
31
|
+
ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK
|
32
|
+
CZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejAeFw0yMjA4MDYwNDUz
|
33
|
+
MjRaFw0zMjA4MDMwNDUzMjRaMGExGDAWBgNVBAMMD3NhbXVlbC53aWxsaWFtczEd
|
34
|
+
MBsGCgmSJomT8ixkARkWDW9yaW9udHJhbnNmZXIxEjAQBgoJkiaJk/IsZAEZFgJj
|
35
|
+
bzESMBAGCgmSJomT8ixkARkWAm56MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB
|
36
|
+
igKCAYEAomvSopQXQ24+9DBB6I6jxRI2auu3VVb4nOjmmHq7XWM4u3HL+pni63X2
|
37
|
+
9qZdoq9xt7H+RPbwL28LDpDNflYQXoOhoVhQ37Pjn9YDjl8/4/9xa9+NUpl9XDIW
|
38
|
+
sGkaOY0eqsQm1pEWkHJr3zn/fxoKPZPfaJOglovdxf7dgsHz67Xgd/ka+Wo1YqoE
|
39
|
+
e5AUKRwUuvaUaumAKgPH+4E4oiLXI4T1Ff5Q7xxv6yXvHuYtlMHhYfgNn8iiW8WN
|
40
|
+
XibYXPNP7NtieSQqwR/xM6IRSoyXKuS+ZNGDPUUGk8RoiV/xvVN4LrVm9upSc0ss
|
41
|
+
RZ6qwOQmXCo/lLcDUxJAgG95cPw//sI00tZan75VgsGzSWAOdjQpFM0l4dxvKwHn
|
42
|
+
tUeT3ZsAgt0JnGqNm2Bkz81kG4A2hSyFZTFA8vZGhp+hz+8Q573tAR89y9YJBdYM
|
43
|
+
zp0FM4zwMNEUwgfRzv1tEVVUEXmoFCyhzonUUw4nE4CFu/sE3ffhjKcXcY//qiSW
|
44
|
+
xm4erY3XAgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
|
45
|
+
BBYEFO9t7XWuFf2SKLmuijgqR4sGDlRsMC4GA1UdEQQnMCWBI3NhbXVlbC53aWxs
|
46
|
+
aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWBI3NhbXVlbC53aWxs
|
47
|
+
aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE
|
48
|
+
cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl
|
49
|
+
xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/
|
50
|
+
c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp
|
51
|
+
8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws
|
52
|
+
JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
|
53
|
+
eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
|
54
|
+
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
55
|
+
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
56
|
+
-----END CERTIFICATE-----
|
57
|
+
date: 2022-09-05 00:00:00.000000000 Z
|
29
58
|
dependencies:
|
30
59
|
- !ruby/object:Gem::Dependency
|
31
60
|
name: console
|
@@ -84,7 +113,21 @@ dependencies:
|
|
84
113
|
- !ruby/object:Gem::Version
|
85
114
|
version: '1.1'
|
86
115
|
- !ruby/object:Gem::Dependency
|
87
|
-
name: bake
|
116
|
+
name: bake-test
|
117
|
+
requirement: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - ">="
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
type: :development
|
123
|
+
prerelease: false
|
124
|
+
version_requirements: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '0'
|
129
|
+
- !ruby/object:Gem::Dependency
|
130
|
+
name: bake-test-external
|
88
131
|
requirement: !ruby/object:Gem::Requirement
|
89
132
|
requirements:
|
90
133
|
- - ">="
|
@@ -178,6 +221,8 @@ files:
|
|
178
221
|
- lib/async/wrapper.rb
|
179
222
|
- lib/kernel/async.rb
|
180
223
|
- lib/kernel/sync.rb
|
224
|
+
- license.md
|
225
|
+
- readme.md
|
181
226
|
homepage: https://github.com/socketry/async
|
182
227
|
licenses:
|
183
228
|
- MIT
|
@@ -197,7 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
197
242
|
- !ruby/object:Gem::Version
|
198
243
|
version: '0'
|
199
244
|
requirements: []
|
200
|
-
rubygems_version: 3.3.
|
245
|
+
rubygems_version: 3.3.7
|
201
246
|
signing_key:
|
202
247
|
specification_version: 4
|
203
248
|
summary: A concurrency framework for Ruby.
|
metadata.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
y���ݢ�21�-D�
|