io-event 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19b363c469b81cd49232e4e91a07c26cd0883984b8b54aa3fb34c5d861d5c577
4
- data.tar.gz: 050f76cc397e3ec9e44b861c6469ba37d845d6a11fbc05f390e32a12a24061b5
3
+ metadata.gz: 92c441dcc5d0c1c052d12cca378cb86ed81ce156bbff09b8d699699424acb3e6
4
+ data.tar.gz: bd971d884cd6decd4b6e2b0de10248255d17161acb556a709f24aa732594eb32
5
5
  SHA512:
6
- metadata.gz: 704987de2d3aa4107621717ef84e9aad8d06c0c0ba062e4f63b0f0ef40f11e86e2971fec26e2e95f45494d2c60045d1991cdaf26c92bb7580d98e4eea0a94be8
7
- data.tar.gz: 1d6da8310ee63c3e6d821d2dbc5c23affe02015ba44daa1e999a71de6a929d7c274379fab981495e47ea82157bda22e1dfe1e5ffc36ba380a36cd8ac9c65515f
6
+ metadata.gz: b296a4cabf9c7db248139f23821bd9f43894269494c9f831dd0e56a67ab4b89e7346dcb7bb20c510a5067a2309e0372a743a862c548a7f781c84e3f6a51e4287
7
+ data.tar.gz: fd8df36184a53e494ec16e378721f0d35305c97b561e393821eae88d0c7b8775f04f9f883821530f07a2584525978a4c1c14912dba4f35cfe366638f396a82db
data/ext/IO_Event.bundle CHANGED
Binary file
@@ -299,6 +299,11 @@ VALUE io_wait_transfer(VALUE _arguments) {
299
299
 
300
300
  VALUE result = IO_Event_Selector_fiber_transfer(arguments->data->backend.loop, 0, NULL);
301
301
 
302
+ // If the fiber is being cancelled, it might be resumed with nil:
303
+ if (!RTEST(result)) {
304
+ return Qfalse;
305
+ }
306
+
302
307
  return INT2NUM(events_from_epoll_flags(NUM2INT(result)));
303
308
  };
304
309
 
@@ -355,6 +355,11 @@ VALUE io_wait_transfer(VALUE _arguments) {
355
355
 
356
356
  VALUE result = IO_Event_Selector_fiber_transfer(arguments->data->backend.loop, 0, NULL);
357
357
 
358
+ // If the fiber is being cancelled, it might be resumed with nil:
359
+ if (!RTEST(result)) {
360
+ return Qfalse;
361
+ }
362
+
358
363
  return INT2NUM(events_from_kqueue_filter(RB_NUM2INT(result)));
359
364
  }
360
365
 
@@ -338,6 +338,10 @@ VALUE io_wait_transfer(VALUE _arguments) {
338
338
  VALUE result = IO_Event_Selector_fiber_transfer(data->backend.loop, 0, NULL);
339
339
  if (DEBUG) fprintf(stderr, "io_wait:IO_Event_Selector_fiber_transfer -> %d\n", RB_NUM2INT(result));
340
340
 
341
+ if (!RTEST(result)) {
342
+ return Qfalse;
343
+ }
344
+
341
345
  // We explicitly filter the resulting events based on the requested events.
342
346
  // In some cases, poll will report events we didn't ask for.
343
347
  short flags = arguments->flags & NUM2INT(result);
data/ext/kqueue.o CHANGED
Binary file
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module IO::Event
22
- VERSION = "1.0.0"
22
+ VERSION = "1.0.1"
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: io-event
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-23 00:00:00.000000000 Z
11
+ date: 2021-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bake
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  - !ruby/object:Gem::Version
121
121
  version: '0'
122
122
  requirements: []
123
- rubygems_version: 3.3.0
123
+ rubygems_version: 3.3.2
124
124
  signing_key:
125
125
  specification_version: 4
126
126
  summary: An event loop.