io-event 1.7.2 → 1.7.4
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/ext/io/event/selector/array.h +2 -4
- data/ext/io/event/selector/epoll.c +7 -0
- data/ext/io/event/selector/kqueue.c +1 -0
- data/ext/io/event/selector/selector.c +4 -0
- data/lib/io/event/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +3 -3
- 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: 9761a366e91db284c56c77d2ec19db8b6d652d98f2fe39750108e685ff3c2b12
|
4
|
+
data.tar.gz: 3d9d1fab942ec257073a317cecefb06248952e5e7c2518f0298d60b476ec1905
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e7c4790ad17bb655136e1ce25b006c4bc97906b7b46eac2abddddd100eb882d19569da27ae195455b457ea3f243bd8ebe6475a9d0255f1bd11bf33cf66edd15
|
7
|
+
data.tar.gz: 00b9bc9c8ad79828b50b67fdf9fb9a9d25664fb5d9b8c77eb70aa708ee719974b07ba6ed4c3098d76c9b33132061070d36bc39c2c5c707448a9400cef0f2a4ed
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -8,10 +8,8 @@
|
|
8
8
|
#include <errno.h>
|
9
9
|
#include <assert.h>
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
IO_EVENT_ARRAY_DEFAULT_COUNT = 128
|
14
|
-
};
|
11
|
+
static const size_t IO_EVENT_ARRAY_MAXIMUM_COUNT = SIZE_MAX / sizeof(void*);
|
12
|
+
static const size_t IO_EVENT_ARRAY_DEFAULT_COUNT = 128;
|
15
13
|
|
16
14
|
struct IO_Event_Array {
|
17
15
|
// The array of pointers to elements:
|
@@ -504,6 +504,13 @@ VALUE IO_Event_Selector_EPoll_process_wait(VALUE self, VALUE fiber, VALUE _pid,
|
|
504
504
|
|
505
505
|
rb_update_max_fd(descriptor);
|
506
506
|
|
507
|
+
// `pidfd_open` (above) may be edge triggered, so we need to check if the process is already exited, and if so, return immediately, otherwise we will block indefinitely.
|
508
|
+
VALUE status = IO_Event_Selector_process_status_wait(pid, flags);
|
509
|
+
if (status != Qnil) {
|
510
|
+
close(descriptor);
|
511
|
+
return status;
|
512
|
+
}
|
513
|
+
|
507
514
|
struct IO_Event_Selector_EPoll_Waiting waiting = {
|
508
515
|
.list = {.type = &IO_Event_Selector_EPoll_process_wait_list_type},
|
509
516
|
.fiber = fiber,
|
@@ -461,6 +461,7 @@ void process_prewait(pid_t pid) {
|
|
461
461
|
result = waitid(P_PID, pid, &info, WEXITED | WNOWAIT);
|
462
462
|
// This can sometimes get interrupted by SIGCHLD.
|
463
463
|
} while (result == -1 && errno == EINTR);
|
464
|
+
|
464
465
|
if (result == -1) {
|
465
466
|
rb_sys_fail("process_prewait:waitid");
|
466
467
|
}
|
@@ -233,6 +233,8 @@ VALUE IO_Event_Selector_resume(struct IO_Event_Selector *backend, int argc, VALU
|
|
233
233
|
.fiber = rb_fiber_current()
|
234
234
|
};
|
235
235
|
|
236
|
+
RB_OBJ_WRITTEN(backend->self, Qundef, waiting.fiber);
|
237
|
+
|
236
238
|
queue_push(backend, &waiting);
|
237
239
|
|
238
240
|
struct wait_and_transfer_arguments arguments = {
|
@@ -266,6 +268,8 @@ VALUE IO_Event_Selector_raise(struct IO_Event_Selector *backend, int argc, VALUE
|
|
266
268
|
.fiber = rb_fiber_current()
|
267
269
|
};
|
268
270
|
|
271
|
+
RB_OBJ_WRITTEN(backend->self, Qundef, waiting.fiber);
|
272
|
+
|
269
273
|
queue_push(backend, &waiting);
|
270
274
|
|
271
275
|
struct wait_and_transfer_arguments arguments = {
|
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.7.
|
4
|
+
version: 1.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -45,7 +45,7 @@ cert_chain:
|
|
45
45
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
46
46
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
47
47
|
-----END CERTIFICATE-----
|
48
|
-
date: 2024-
|
48
|
+
date: 2024-11-24 00:00:00.000000000 Z
|
49
49
|
dependencies: []
|
50
50
|
description:
|
51
51
|
email:
|
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
|
-
rubygems_version: 3.5.
|
107
|
+
rubygems_version: 3.5.22
|
108
108
|
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: An event loop.
|
metadata.gz.sig
CHANGED
Binary file
|