io-event 1.1.4 → 1.1.5

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: 24132010da80dc62afdf1bc31b5e7b9c26fe6ad4f38c14b09e507f202d72afdd
4
- data.tar.gz: 551cffa8341dd52ed993b937ea6924853c32ef0a41ac9e06f7c45345cb92fae1
3
+ metadata.gz: 26fea80dce46f28ba71af255facb8ef1daca055ba8da63c6bc585eef3baad7b7
4
+ data.tar.gz: 5b0eeb129fc7203e0ffb9dedd5c0638ba2c05c025c47496b79491e13fc160095
5
5
  SHA512:
6
- metadata.gz: 7d09aca9258a428103a2f2c3ecd28d7a64f7901a20302f26f02499d52025e875c17c134d46bc84a32228a189a7cbc520478e3f1e10c39b23317d8b1a1352ece2
7
- data.tar.gz: e7ec8eaa45eb246110de0ae32a39704d8885ad2952b30c6c392194eef45f7def5edea15194cc1831eb979c39d9b095e9184f464e0cd13cc72a8b1ac5c3fb252b
6
+ metadata.gz: f78ca39439f5c89185f96432907f980944d778c2ceffc1f51355e810caac1b844fbb8e8e83b14a3df25d9e8205a40b5b1673052ba9eb2924a9f00639cdfbee54
7
+ data.tar.gz: 1418caaf2eb40020e1b7a984d9d77b5c63a795ede985eab0854d24ad35004304ed0fc6ea5eebf5f77ec37d13c5edff490ad6111b98d8899b2ded50cdca043cc3
checksums.yaml.gz.sig CHANGED
Binary file
@@ -656,6 +656,9 @@ VALUE IO_Event_Selector_URing_select(VALUE self, VALUE duration) {
656
656
  struct IO_Event_Selector_URing *data = NULL;
657
657
  TypedData_Get_Struct(self, struct IO_Event_Selector_URing, &IO_Event_Selector_URing_Type, data);
658
658
 
659
+ // Flush any pending events:
660
+ io_uring_submit_flush(data);
661
+
659
662
  int ready = IO_Event_Selector_queue_flush(&data->backend);
660
663
 
661
664
  int result = select_process_completions(&data->ring);
@@ -29,6 +29,8 @@ module IO::Event
29
29
  def signal
30
30
  @output.write('.')
31
31
  @output.flush
32
+ rescue IOError
33
+ # Ignore.
32
34
  end
33
35
 
34
36
  def close
@@ -134,14 +134,20 @@ module IO::Event
134
134
  waiter&.invalidate
135
135
  end
136
136
 
137
- EAGAIN = -Errno::EAGAIN::Errno
138
- EWOULDBLOCK = -Errno::EWOULDBLOCK::Errno
139
-
140
- def again?(errno)
141
- errno == EAGAIN or errno == EWOULDBLOCK
137
+ def io_select(readable, writable, priority, timeout)
138
+ Thread.new do
139
+ IO.select(readable, writable, priority, timeout)
140
+ end.value
142
141
  end
143
142
 
144
143
  if Support.fiber_scheduler_v2?
144
+ EAGAIN = -Errno::EAGAIN::Errno
145
+ EWOULDBLOCK = -Errno::EWOULDBLOCK::Errno
146
+
147
+ def again?(errno)
148
+ errno == EAGAIN or errno == EWOULDBLOCK
149
+ end
150
+
145
151
  def io_read(fiber, io, buffer, length, offset = 0)
146
152
  total = 0
147
153
 
@@ -5,6 +5,6 @@
5
5
 
6
6
  class IO
7
7
  module Event
8
- VERSION = "1.1.4"
8
+ VERSION = "1.1.5"
9
9
  end
10
10
  end
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.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -41,7 +41,7 @@ cert_chain:
41
41
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
42
42
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
43
43
  -----END CERTIFICATE-----
44
- date: 2022-12-07 00:00:00.000000000 Z
44
+ date: 2023-01-06 00:00:00.000000000 Z
45
45
  dependencies:
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: bake
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  - !ruby/object:Gem::Version
151
151
  version: '0'
152
152
  requirements: []
153
- rubygems_version: 3.3.7
153
+ rubygems_version: 3.4.1
154
154
  signing_key:
155
155
  specification_version: 4
156
156
  summary: An event loop.
metadata.gz.sig CHANGED
Binary file