uringmachine 0.8.1 → 0.8.2
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
- data/CHANGELOG.md +4 -0
- data/ext/um/um.c +14 -2
- data/lib/uringmachine/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: 24d5dacdb24cc1da4928d753803bd8012502147aaae23c4c7d9e53945550233c
|
4
|
+
data.tar.gz: 783c8359ae60e149944bd7f79ac588c9b85241f5cec66de11eeae60b92e99753
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84c77a3826b01acd67bfca663d93e8a8e2a093b7415861040087d7bdcac97f34f3ed829c67529e6dd52abdc0ac88ac8395a0a39315f98fb2966f617c9b8f8dcb
|
7
|
+
data.tar.gz: 238b77b0a4d669b3421d8ce26e888dad76d0885b19405017c1ce2c118f5fb0ac022c4ffed7288ae6389dda6f54810e511e77209bcc8f2e8872aee9a4573fa704
|
data/CHANGELOG.md
CHANGED
data/ext/um/um.c
CHANGED
@@ -156,8 +156,20 @@ static inline void um_wait_for_and_process_ready_cqes(struct um *machine, int wa
|
|
156
156
|
struct wait_for_cqe_ctx ctx = { .machine = machine, .cqe = NULL, .wait_nr = wait_nr };
|
157
157
|
rb_thread_call_without_gvl(um_wait_for_cqe_without_gvl, (void *)&ctx, RUBY_UBF_IO, 0);
|
158
158
|
|
159
|
-
if (unlikely(ctx.result < 0
|
160
|
-
|
159
|
+
if (unlikely(ctx.result < 0)) {
|
160
|
+
// the internal calls to (maybe submit) and wait for cqes may fail with:
|
161
|
+
// -EINTR (interrupted by signal)
|
162
|
+
// -EAGAIN (apparently can be returned when wait_nr = 0)
|
163
|
+
// both should not raise an exception.
|
164
|
+
switch (ctx.result) {
|
165
|
+
case -EINTR:
|
166
|
+
case -EAGAIN:
|
167
|
+
// do nothing
|
168
|
+
break;
|
169
|
+
default:
|
170
|
+
rb_syserr_fail(-ctx.result, strerror(-ctx.result));
|
171
|
+
}
|
172
|
+
}
|
161
173
|
|
162
174
|
if (ctx.cqe) {
|
163
175
|
um_process_cqe(machine, ctx.cqe);
|
data/lib/uringmachine/version.rb
CHANGED