io-event 1.1.5 → 1.1.6
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 +0 -0
- data/ext/io/event/selector/uring.c +2 -3
- data/lib/io/event/selector/nonblock.rb +3 -0
- data/lib/io/event/selector/select.rb +7 -7
- data/lib/io/event/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- 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: c2b1d6d29aedc2b375fa708f5f3518fb39dae6ee0b5c675a4ff571192f3c00ef
|
4
|
+
data.tar.gz: 6e9b9589ef99c97a287d20e4f60f501d87ca163897d21bdd59eb03aa71085ffd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6447991710738ba24577100220b4ca322d79179d736ba3101bdd5fd2a2d8a23aa8983d527ebc13cdde5b038601c17d6a860ed21394a2f3d584ddd68772f505b6
|
7
|
+
data.tar.gz: e8a0232a3f36be1bfab1a1ca8a9e0a68e761d89d9f1576449ea23644eddc2643f89c9963186376d1211f25fb96853cadef82c673ca81af7430cdacb45d3f37ea
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -179,6 +179,7 @@ VALUE IO_Event_Selector_URing_ready_p(VALUE self) {
|
|
179
179
|
return data->backend.ready ? Qtrue : Qfalse;
|
180
180
|
}
|
181
181
|
|
182
|
+
// Flush the submission queue if pending operations are present.
|
182
183
|
static
|
183
184
|
int io_uring_submit_flush(struct IO_Event_Selector_URing *data) {
|
184
185
|
if (data->pending) {
|
@@ -200,6 +201,7 @@ int io_uring_submit_flush(struct IO_Event_Selector_URing *data) {
|
|
200
201
|
return 0;
|
201
202
|
}
|
202
203
|
|
204
|
+
// Immediately flush the submission queue, yielding to the event loop if it was not successful.
|
203
205
|
static
|
204
206
|
int io_uring_submit_now(struct IO_Event_Selector_URing *data) {
|
205
207
|
while (true) {
|
@@ -680,9 +682,6 @@ VALUE IO_Event_Selector_URing_select(VALUE self, VALUE duration) {
|
|
680
682
|
if (!data->backend.ready && !timeout_nonblocking(arguments.timeout)) {
|
681
683
|
// This is a blocking operation, we wait for events:
|
682
684
|
result = select_internal_without_gvl(&arguments);
|
683
|
-
} else {
|
684
|
-
// The timeout specified required "nonblocking" behaviour so we just flush the SQ if required:
|
685
|
-
io_uring_submit_flush(data);
|
686
685
|
}
|
687
686
|
|
688
687
|
// After waiting/flushing the SQ, check if there are any completions:
|
@@ -140,14 +140,14 @@ module IO::Event
|
|
140
140
|
end.value
|
141
141
|
end
|
142
142
|
|
143
|
+
EAGAIN = -Errno::EAGAIN::Errno
|
144
|
+
EWOULDBLOCK = -Errno::EWOULDBLOCK::Errno
|
145
|
+
|
146
|
+
def again?(errno)
|
147
|
+
errno == EAGAIN or errno == EWOULDBLOCK
|
148
|
+
end
|
149
|
+
|
143
150
|
if Support.fiber_scheduler_v2?
|
144
|
-
EAGAIN = -Errno::EAGAIN::Errno
|
145
|
-
EWOULDBLOCK = -Errno::EWOULDBLOCK::Errno
|
146
|
-
|
147
|
-
def again?(errno)
|
148
|
-
errno == EAGAIN or errno == EWOULDBLOCK
|
149
|
-
end
|
150
|
-
|
151
151
|
def io_read(fiber, io, buffer, length, offset = 0)
|
152
152
|
total = 0
|
153
153
|
|
data/lib/io/event/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: io-event
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -41,7 +41,7 @@ cert_chain:
|
|
41
41
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
42
42
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
43
43
|
-----END CERTIFICATE-----
|
44
|
-
date: 2023-01-
|
44
|
+
date: 2023-01-10 00:00:00.000000000 Z
|
45
45
|
dependencies:
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: bake
|
metadata.gz.sig
CHANGED
Binary file
|