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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7fdbc29b1e4c910d05eef327345a52faafd92566d7bdddaad81396bcf1f4767d
4
- data.tar.gz: 4729a2ca7640fd58d0d83cc008db6e3431edfcdf04e396bce9981465a8e4e0a9
3
+ metadata.gz: 24d5dacdb24cc1da4928d753803bd8012502147aaae23c4c7d9e53945550233c
4
+ data.tar.gz: 783c8359ae60e149944bd7f79ac588c9b85241f5cec66de11eeae60b92e99753
5
5
  SHA512:
6
- metadata.gz: 56c03563909bd5acd8466a0ef255cd2a791c9907e7fa9ab0a88d9be22f4db895cfb85f0ed5fc0883d0e583c216e238e954a74623f6d231f38c51de2f65316af8
7
- data.tar.gz: 1471eea52c8edb8bab45e4fa058191c13e1c88a39bd728c1be5f72998058724ab7fb8a699d279fe5ace36fec6dc5eaca5361a4265b909d078cf5549dd3a19af2
6
+ metadata.gz: 84c77a3826b01acd67bfca663d93e8a8e2a093b7415861040087d7bdcac97f34f3ed829c67529e6dd52abdc0ac88ac8395a0a39315f98fb2966f617c9b8f8dcb
7
+ data.tar.gz: 238b77b0a4d669b3421d8ce26e888dad76d0885b19405017c1ce2c118f5fb0ac022c4ffed7288ae6389dda6f54810e511e77209bcc8f2e8872aee9a4573fa704
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 2025-05-05 Version 0.8.2
2
+
3
+ - Correctly deal with -EAGAIN when waiting for CQEs
4
+
1
5
  # 2025-05-05 Version 0.8.1
2
6
 
3
7
  - Fix `#snooze` to not block waiting for CQE
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 && ctx.result != -EINTR))
160
- rb_syserr_fail(-ctx.result, strerror(-ctx.result));
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);
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class UringMachine
4
- VERSION = '0.8.1'
4
+ VERSION = '0.8.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uringmachine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sharon Rosner