io-event 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/io/event/selector/epoll.c +6 -6
- data/ext/io/event/selector/kqueue.c +5 -5
- data/ext/io/event/selector/uring.c +4 -4
- data/lib/io/event/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44bfa6c2e533879211e047db7dc1e7ed75140b766fb06ae5bfcfd0bb8bf0e1fd
|
4
|
+
data.tar.gz: 3144d4fb088de8328e27510cac3568722b0d67bdcc6d59291871cd02a9701995
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba89e2b85a129685f9cba7361245115541d7e1a278020bc56b67700a1fc9952b3e4f38b35e7bb3b962a4ac3a9ce58424650261d826a7c8a17d100b294d645605
|
7
|
+
data.tar.gz: b0707e2b64b981f65ba2628d97c8e239b4bb54f686b358b9fff3de096e4dc01f8beb55acb3c5be97c77eaaa797aca501b29f0be6274c345dbdec88ef97b44bdb
|
@@ -115,7 +115,7 @@ VALUE IO_Event_Selector_EPoll_initialize(VALUE self, VALUE loop) {
|
|
115
115
|
int result = epoll_create1(EPOLL_CLOEXEC);
|
116
116
|
|
117
117
|
if (result == -1) {
|
118
|
-
rb_sys_fail("epoll_create");
|
118
|
+
rb_sys_fail("IO_Event_Selector_EPoll_initialize:epoll_create");
|
119
119
|
} else {
|
120
120
|
data->descriptor = result;
|
121
121
|
|
@@ -241,7 +241,7 @@ VALUE IO_Event_Selector_EPoll_process_wait(VALUE self, VALUE fiber, VALUE pid, V
|
|
241
241
|
int result = epoll_ctl(data->descriptor, EPOLL_CTL_ADD, process_wait_arguments.descriptor, &event);
|
242
242
|
|
243
243
|
if (result == -1) {
|
244
|
-
rb_sys_fail("epoll_ctl
|
244
|
+
rb_sys_fail("IO_Event_Selector_EPoll_process_wait:epoll_ctl");
|
245
245
|
}
|
246
246
|
|
247
247
|
return rb_ensure(process_wait_transfer, (VALUE)&process_wait_arguments, process_wait_ensure, (VALUE)&process_wait_arguments);
|
@@ -326,13 +326,13 @@ VALUE IO_Event_Selector_EPoll_io_wait(VALUE self, VALUE fiber, VALUE io, VALUE e
|
|
326
326
|
rb_update_max_fd(duplicate);
|
327
327
|
|
328
328
|
if (descriptor == -1)
|
329
|
-
rb_sys_fail("dup");
|
329
|
+
rb_sys_fail("IO_Event_Selector_EPoll_io_wait:dup");
|
330
330
|
|
331
331
|
result = epoll_ctl(data->descriptor, EPOLL_CTL_ADD, descriptor, &event);
|
332
332
|
}
|
333
333
|
|
334
334
|
if (result == -1) {
|
335
|
-
rb_sys_fail("epoll_ctl");
|
335
|
+
rb_sys_fail("IO_Event_Selector_EPoll_io_wait:epoll_ctl");
|
336
336
|
}
|
337
337
|
|
338
338
|
struct io_wait_arguments io_wait_arguments = {
|
@@ -386,7 +386,7 @@ VALUE io_read_loop(VALUE _arguments) {
|
|
386
386
|
} else if (errno == EAGAIN || errno == EWOULDBLOCK) {
|
387
387
|
IO_Event_Selector_EPoll_io_wait(arguments->self, arguments->fiber, arguments->io, RB_INT2NUM(IO_EVENT_READABLE));
|
388
388
|
} else {
|
389
|
-
rb_sys_fail("IO_Event_Selector_EPoll_io_read");
|
389
|
+
rb_sys_fail("IO_Event_Selector_EPoll_io_read:read");
|
390
390
|
}
|
391
391
|
}
|
392
392
|
|
@@ -460,7 +460,7 @@ VALUE io_write_loop(VALUE _arguments) {
|
|
460
460
|
} else if (errno == EAGAIN || errno == EWOULDBLOCK) {
|
461
461
|
IO_Event_Selector_EPoll_io_wait(arguments->self, arguments->fiber, arguments->io, RB_INT2NUM(IO_EVENT_WRITABLE));
|
462
462
|
} else {
|
463
|
-
rb_sys_fail("IO_Event_Selector_EPoll_io_write");
|
463
|
+
rb_sys_fail("IO_Event_Selector_EPoll_io_write:write");
|
464
464
|
}
|
465
465
|
}
|
466
466
|
|
@@ -95,7 +95,7 @@ VALUE IO_Event_Selector_KQueue_initialize(VALUE self, VALUE loop) {
|
|
95
95
|
int result = kqueue();
|
96
96
|
|
97
97
|
if (result == -1) {
|
98
|
-
rb_sys_fail("kqueue");
|
98
|
+
rb_sys_fail("IO_Event_Selector_KQueue_initialize:kqueue");
|
99
99
|
} else {
|
100
100
|
ioctl(result, FIOCLEX);
|
101
101
|
data->descriptor = result;
|
@@ -195,7 +195,7 @@ int process_add_filters(int descriptor, int ident, VALUE fiber) {
|
|
195
195
|
return 0;
|
196
196
|
}
|
197
197
|
|
198
|
-
rb_sys_fail("kevent
|
198
|
+
rb_sys_fail("process_add_filters:kevent");
|
199
199
|
}
|
200
200
|
|
201
201
|
return 1;
|
@@ -289,7 +289,7 @@ int io_add_filters(int descriptor, int ident, int events, VALUE fiber) {
|
|
289
289
|
int result = kevent(descriptor, kevents, count, NULL, 0, NULL);
|
290
290
|
|
291
291
|
if (result == -1) {
|
292
|
-
rb_sys_fail("kevent
|
292
|
+
rb_sys_fail("io_add_filters:kevent");
|
293
293
|
}
|
294
294
|
|
295
295
|
return events;
|
@@ -408,7 +408,7 @@ VALUE io_read_loop(VALUE _arguments) {
|
|
408
408
|
} else if (errno == EAGAIN || errno == EWOULDBLOCK) {
|
409
409
|
IO_Event_Selector_KQueue_io_wait(arguments->self, arguments->fiber, arguments->io, RB_INT2NUM(IO_EVENT_READABLE));
|
410
410
|
} else {
|
411
|
-
rb_sys_fail("IO_Event_Selector_KQueue_io_read");
|
411
|
+
rb_sys_fail("IO_Event_Selector_KQueue_io_read:read");
|
412
412
|
}
|
413
413
|
}
|
414
414
|
|
@@ -485,7 +485,7 @@ VALUE io_write_loop(VALUE _arguments) {
|
|
485
485
|
} else if (errno == EAGAIN || errno == EWOULDBLOCK) {
|
486
486
|
IO_Event_Selector_KQueue_io_wait(arguments->self, arguments->fiber, arguments->io, RB_INT2NUM(IO_EVENT_WRITABLE));
|
487
487
|
} else {
|
488
|
-
rb_sys_fail("IO_Event_Selector_KQueue_io_write");
|
488
|
+
rb_sys_fail("IO_Event_Selector_KQueue_io_write:write");
|
489
489
|
}
|
490
490
|
}
|
491
491
|
|
@@ -100,7 +100,7 @@ VALUE IO_Event_Selector_URing_initialize(VALUE self, VALUE loop) {
|
|
100
100
|
int result = io_uring_queue_init(URING_ENTRIES, &data->ring, 0);
|
101
101
|
|
102
102
|
if (result < 0) {
|
103
|
-
rb_syserr_fail(-result, "io_uring_queue_init");
|
103
|
+
rb_syserr_fail(-result, "IO_Event_Selector_URing_initialize:io_uring_queue_init");
|
104
104
|
}
|
105
105
|
|
106
106
|
rb_update_max_fd(data->ring.ring_fd);
|
@@ -186,7 +186,7 @@ int io_uring_submit_flush(struct IO_Event_Selector_URing *data) {
|
|
186
186
|
// If it was submitted, reset pending count:
|
187
187
|
data->pending = 0;
|
188
188
|
} else if (result != -EBUSY && result != -EAGAIN) {
|
189
|
-
rb_syserr_fail(-result, "io_uring_submit_flush");
|
189
|
+
rb_syserr_fail(-result, "io_uring_submit_flush:io_uring_submit");
|
190
190
|
}
|
191
191
|
|
192
192
|
return result;
|
@@ -208,7 +208,7 @@ int io_uring_submit_now(struct IO_Event_Selector_URing *data) {
|
|
208
208
|
if (result == -EBUSY || result == -EAGAIN) {
|
209
209
|
IO_Event_Selector_yield(&data->backend);
|
210
210
|
} else {
|
211
|
-
rb_syserr_fail(-result, "io_uring_submit_now");
|
211
|
+
rb_syserr_fail(-result, "io_uring_submit_now:io_uring_submit");
|
212
212
|
}
|
213
213
|
}
|
214
214
|
}
|
@@ -554,7 +554,7 @@ int select_internal_without_gvl(struct select_arguments *arguments) {
|
|
554
554
|
if (arguments->result == -ETIME) {
|
555
555
|
arguments->result = 0;
|
556
556
|
} else if (arguments->result < 0) {
|
557
|
-
rb_syserr_fail(-arguments->result, "select_internal_without_gvl:
|
557
|
+
rb_syserr_fail(-arguments->result, "select_internal_without_gvl:io_uring_wait_cqe_timeout");
|
558
558
|
} else {
|
559
559
|
// At least 1 event is waiting:
|
560
560
|
arguments->result = 1;
|
data/lib/io/event/version.rb
CHANGED