io-event 1.1.5 → 1.1.6

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: 26fea80dce46f28ba71af255facb8ef1daca055ba8da63c6bc585eef3baad7b7
4
- data.tar.gz: 5b0eeb129fc7203e0ffb9dedd5c0638ba2c05c025c47496b79491e13fc160095
3
+ metadata.gz: c2b1d6d29aedc2b375fa708f5f3518fb39dae6ee0b5c675a4ff571192f3c00ef
4
+ data.tar.gz: 6e9b9589ef99c97a287d20e4f60f501d87ca163897d21bdd59eb03aa71085ffd
5
5
  SHA512:
6
- metadata.gz: f78ca39439f5c89185f96432907f980944d778c2ceffc1f51355e810caac1b844fbb8e8e83b14a3df25d9e8205a40b5b1673052ba9eb2924a9f00639cdfbee54
7
- data.tar.gz: 1418caaf2eb40020e1b7a984d9d77b5c63a795ede985eab0854d24ad35004304ed0fc6ea5eebf5f77ec37d13c5edff490ad6111b98d8899b2ded50cdca043cc3
6
+ metadata.gz: 6447991710738ba24577100220b4ca322d79179d736ba3101bdd5fd2a2d8a23aa8983d527ebc13cdde5b038601c17d6a860ed21394a2f3d584ddd68772f505b6
7
+ data.tar.gz: e8a0232a3f36be1bfab1a1ca8a9e0a68e761d89d9f1576449ea23644eddc2643f89c9963186376d1211f25fb96853cadef82c673ca81af7430cdacb45d3f37ea
checksums.yaml.gz.sig CHANGED
Binary file
@@ -179,6 +179,7 @@ VALUE IO_Event_Selector_URing_ready_p(VALUE self) {
179
179
  return data->backend.ready ? Qtrue : Qfalse;
180
180
  }
181
181
 
182
+ // Flush the submission queue if pending operations are present.
182
183
  static
183
184
  int io_uring_submit_flush(struct IO_Event_Selector_URing *data) {
184
185
  if (data->pending) {
@@ -200,6 +201,7 @@ int io_uring_submit_flush(struct IO_Event_Selector_URing *data) {
200
201
  return 0;
201
202
  }
202
203
 
204
+ // Immediately flush the submission queue, yielding to the event loop if it was not successful.
203
205
  static
204
206
  int io_uring_submit_now(struct IO_Event_Selector_URing *data) {
205
207
  while (true) {
@@ -680,9 +682,6 @@ VALUE IO_Event_Selector_URing_select(VALUE self, VALUE duration) {
680
682
  if (!data->backend.ready && !timeout_nonblocking(arguments.timeout)) {
681
683
  // This is a blocking operation, we wait for events:
682
684
  result = select_internal_without_gvl(&arguments);
683
- } else {
684
- // The timeout specified required "nonblocking" behaviour so we just flush the SQ if required:
685
- io_uring_submit_flush(data);
686
685
  }
687
686
 
688
687
  // After waiting/flushing the SQ, check if there are any completions:
@@ -9,6 +9,9 @@ module IO::Event
9
9
  module Selector
10
10
  def self.nonblock(io, &block)
11
11
  io.nonblock(&block)
12
+ rescue Errno::EBADF
13
+ # Windows.
14
+ yield
12
15
  end
13
16
  end
14
17
  end
@@ -140,14 +140,14 @@ module IO::Event
140
140
  end.value
141
141
  end
142
142
 
143
+ EAGAIN = -Errno::EAGAIN::Errno
144
+ EWOULDBLOCK = -Errno::EWOULDBLOCK::Errno
145
+
146
+ def again?(errno)
147
+ errno == EAGAIN or errno == EWOULDBLOCK
148
+ end
149
+
143
150
  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
-
151
151
  def io_read(fiber, io, buffer, length, offset = 0)
152
152
  total = 0
153
153
 
@@ -5,6 +5,6 @@
5
5
 
6
6
  class IO
7
7
  module Event
8
- VERSION = "1.1.5"
8
+ VERSION = "1.1.6"
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.5
4
+ version: 1.1.6
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: 2023-01-06 00:00:00.000000000 Z
44
+ date: 2023-01-10 00:00:00.000000000 Z
45
45
  dependencies:
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: bake
metadata.gz.sig CHANGED
Binary file