async 2.11.0 → 2.12.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/scheduler.rb +6 -7
- data/lib/async/version.rb +1 -1
- data/readme.md +1 -2
- data.tar.gz.sig +0 -0
- metadata +4 -24
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d13c552e4e34cd2b67661c228e727df5d3c7da697e7f59f369e02af5c76e513
|
4
|
+
data.tar.gz: 954607e3c71338fb54fc59d627211a722870a5f8f934c84c113735cf24c24195
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 392264144eed819eb93c49e53d2f0de6771cb966314a4e901223138af848fe550be76dd55bcc267db36d2593893e8421193568704987bcaab241171e13003e4c
|
7
|
+
data.tar.gz: 85d97a0013909d6b1be52f73b49fcf3c7610ac59f43ab3794b0959d0266a2c283ea220fb6549fadb13e03be84abc5683988e15b07e607aefc24cca81eeab2479
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/async/scheduler.rb
CHANGED
@@ -11,7 +11,6 @@ require_relative 'task'
|
|
11
11
|
require 'io/event'
|
12
12
|
|
13
13
|
require 'console'
|
14
|
-
require 'timers'
|
15
14
|
require 'resolv'
|
16
15
|
|
17
16
|
module Async
|
@@ -40,7 +39,7 @@ module Async
|
|
40
39
|
@busy_time = 0.0
|
41
40
|
@idle_time = 0.0
|
42
41
|
|
43
|
-
@timers = ::Timers
|
42
|
+
@timers = ::IO::Event::Timers.new
|
44
43
|
end
|
45
44
|
|
46
45
|
# Compute the scheduler load according to the busy and idle times that are updated by the run loop.
|
@@ -165,7 +164,7 @@ module Async
|
|
165
164
|
@blocked -= 1
|
166
165
|
end
|
167
166
|
ensure
|
168
|
-
timer&.cancel
|
167
|
+
timer&.cancel!
|
169
168
|
end
|
170
169
|
|
171
170
|
# @asynchronous May be called from any thread.
|
@@ -225,7 +224,7 @@ module Async
|
|
225
224
|
|
226
225
|
return @selector.io_wait(fiber, io, events)
|
227
226
|
ensure
|
228
|
-
timer&.cancel
|
227
|
+
timer&.cancel!
|
229
228
|
end
|
230
229
|
|
231
230
|
if ::IO::Event::Support.buffer?
|
@@ -240,7 +239,7 @@ module Async
|
|
240
239
|
|
241
240
|
@selector.io_read(fiber, io, buffer, length, offset)
|
242
241
|
ensure
|
243
|
-
timer&.cancel
|
242
|
+
timer&.cancel!
|
244
243
|
end
|
245
244
|
|
246
245
|
if RUBY_ENGINE != "ruby" || RUBY_VERSION >= "3.3.1"
|
@@ -255,7 +254,7 @@ module Async
|
|
255
254
|
|
256
255
|
@selector.io_write(fiber, io, buffer, length, offset)
|
257
256
|
ensure
|
258
|
-
timer&.cancel
|
257
|
+
timer&.cancel!
|
259
258
|
end
|
260
259
|
end
|
261
260
|
end
|
@@ -416,7 +415,7 @@ module Async
|
|
416
415
|
|
417
416
|
yield timer
|
418
417
|
ensure
|
419
|
-
timer
|
418
|
+
timer&.cancel!
|
420
419
|
end
|
421
420
|
|
422
421
|
def timeout_after(duration, exception, message, &block)
|
data/lib/async/version.rb
CHANGED
data/readme.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# 
|
2
2
|
|
3
|
-
Async is a composable asynchronous I/O framework for Ruby based on [io-event](https://github.com/socketry/io-event)
|
4
|
-
[timers](https://github.com/socketry/timers).
|
3
|
+
Async is a composable asynchronous I/O framework for Ruby based on [io-event](https://github.com/socketry/io-event).
|
5
4
|
|
6
5
|
> "Lately I've been looking into `async`, as one of my projects –
|
7
6
|
> [tus-ruby-server](https://github.com/janko/tus-ruby-server) – would really benefit from non-blocking I/O. It's really
|
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.
|
4
|
+
version: 2.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -62,7 +62,7 @@ cert_chain:
|
|
62
62
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
63
63
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
64
64
|
-----END CERTIFICATE-----
|
65
|
-
date: 2024-
|
65
|
+
date: 2024-06-04 00:00:00.000000000 Z
|
66
66
|
dependencies:
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: console
|
@@ -104,34 +104,14 @@ dependencies:
|
|
104
104
|
requirements:
|
105
105
|
- - "~>"
|
106
106
|
- !ruby/object:Gem::Version
|
107
|
-
version: '1.
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 1.5.1
|
111
|
-
type: :runtime
|
112
|
-
prerelease: false
|
113
|
-
version_requirements: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '1.5'
|
118
|
-
- - ">="
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
version: 1.5.1
|
121
|
-
- !ruby/object:Gem::Dependency
|
122
|
-
name: timers
|
123
|
-
requirement: !ruby/object:Gem::Requirement
|
124
|
-
requirements:
|
125
|
-
- - "~>"
|
126
|
-
- !ruby/object:Gem::Version
|
127
|
-
version: '4.1'
|
107
|
+
version: '1.6'
|
128
108
|
type: :runtime
|
129
109
|
prerelease: false
|
130
110
|
version_requirements: !ruby/object:Gem::Requirement
|
131
111
|
requirements:
|
132
112
|
- - "~>"
|
133
113
|
- !ruby/object:Gem::Version
|
134
|
-
version: '
|
114
|
+
version: '1.6'
|
135
115
|
description:
|
136
116
|
email:
|
137
117
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|