io-event 1.20.1 → 1.21.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/ext/io/event/selector/uring.c +16 -4
- data/lib/io/event/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- 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: 10e55b8652762ef313727e0fb2c6ce68ef3c8ecfa867642b6c2098a04007210e
|
|
4
|
+
data.tar.gz: ee38d8bfc2cad72ca635ddddcb1e9ff647f86c1961df88239b468e6eeae03102
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f635f52c19266b13191c5572fb34e513f6665ff049434dbc1045dcce83a96ac3edf0418f727417a4dca41fbb4d9336e5deb737a76c996de4cac939937a278b7d
|
|
7
|
+
data.tar.gz: ca520970a7088c0d57d3d0a531cc916c009f290d7a5784f7e8f674802a14505785cb58c06491f89bd161dec871221ca71491f6a235015f467f6be862c9e99d3e
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -648,10 +648,18 @@ static
|
|
|
648
648
|
VALUE process_wait_transfer(VALUE _arguments) {
|
|
649
649
|
struct process_wait_arguments *arguments = (struct process_wait_arguments *)_arguments;
|
|
650
650
|
|
|
651
|
+
#ifdef IO_EVENT_SELECTOR_URING_USE_WAITID
|
|
651
652
|
IO_Event_Selector_loop_yield(&arguments->selector->backend);
|
|
652
653
|
|
|
653
|
-
|
|
654
|
+
if (arguments->waiting->completion) {
|
|
655
|
+
// The kernel may still write to siginfo or reap the child. Keep the C frame alive until the original operation completes, then distinguish cancellation from process completion:
|
|
656
|
+
IO_Event_Selector_URing_Waiting_cancel_and_wait(arguments->selector, arguments->waiting);
|
|
657
|
+
}
|
|
658
|
+
|
|
654
659
|
int32_t result = arguments->waiting->result;
|
|
660
|
+
if (result == -ECANCELED) {
|
|
661
|
+
return Qfalse;
|
|
662
|
+
}
|
|
655
663
|
|
|
656
664
|
if (DEBUG) fprintf(stderr, "waitid result=%d pid=%d code=%d status=%d\n", result, arguments->siginfo.si_pid, arguments->siginfo.si_code, arguments->siginfo.si_status);
|
|
657
665
|
|
|
@@ -672,6 +680,8 @@ VALUE process_wait_transfer(VALUE _arguments) {
|
|
|
672
680
|
return IO_Event_Selector_process_status_reap(arguments->siginfo.si_pid, arguments->flags);
|
|
673
681
|
#endif
|
|
674
682
|
#else
|
|
683
|
+
IO_Event_Selector_loop_yield(&arguments->selector->backend);
|
|
684
|
+
|
|
675
685
|
if (arguments->waiting->result) {
|
|
676
686
|
return IO_Event_Selector_process_status_reap(arguments->pid, arguments->flags);
|
|
677
687
|
} else {
|
|
@@ -684,15 +694,17 @@ static
|
|
|
684
694
|
VALUE process_wait_ensure(VALUE _arguments) {
|
|
685
695
|
struct process_wait_arguments *arguments = (struct process_wait_arguments *)_arguments;
|
|
686
696
|
|
|
697
|
+
#ifdef IO_EVENT_SELECTOR_URING_USE_WAITID
|
|
698
|
+
// `waitid` may write to stack-backed siginfo while cancellation is pending:
|
|
699
|
+
IO_Event_Selector_URing_Waiting_cancel_and_wait(arguments->selector, arguments->waiting);
|
|
700
|
+
#else
|
|
687
701
|
if (arguments->waiting->completion) {
|
|
688
702
|
IO_Event_Selector_URing_Completion_cancel_async(arguments->selector, arguments->waiting->completion);
|
|
689
703
|
}
|
|
690
704
|
|
|
691
|
-
#ifndef IO_EVENT_SELECTOR_URING_USE_WAITID
|
|
692
705
|
close(arguments->descriptor);
|
|
693
|
-
#endif
|
|
694
|
-
|
|
695
706
|
IO_Event_Selector_URing_Waiting_cancel(arguments->waiting);
|
|
707
|
+
#endif
|
|
696
708
|
|
|
697
709
|
return Qnil;
|
|
698
710
|
}
|
data/lib/io/event/version.rb
CHANGED
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|