io-event 1.1.3 → 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: ec111c6ab035a84dedec9e0c8885ccfa23edd8624647d8dc706b818a833a589f
4
- data.tar.gz: '09c50dc090655197aa67dc8b350c6b7d416aaab40c66f98f97c802e005af9efd'
3
+ metadata.gz: 26fea80dce46f28ba71af255facb8ef1daca055ba8da63c6bc585eef3baad7b7
4
+ data.tar.gz: 5b0eeb129fc7203e0ffb9dedd5c0638ba2c05c025c47496b79491e13fc160095
5
5
  SHA512:
6
- metadata.gz: 830a051bdabe8d8883732e9be4f107528e934d1bb673abfefd7a047d9b2090cd7521b05f852938d667d36a0e678c0b82625ccd7c8cd0f677ff453810fcc53308
7
- data.tar.gz: dc99321f39efb5371c9e4fa50d948b0f514e095499d21a48f77e8170b1aeaddbc13fc922be1ddce3a379becbe7abf6d3533cbafbad4a604b97cf3cbe6d434e99
6
+ metadata.gz: f78ca39439f5c89185f96432907f980944d778c2ceffc1f51355e810caac1b844fbb8e8e83b14a3df25d9e8205a40b5b1673052ba9eb2924a9f00639cdfbee54
7
+ data.tar.gz: 1418caaf2eb40020e1b7a984d9d77b5c63a795ede985eab0854d24ad35004304ed0fc6ea5eebf5f77ec37d13c5edff490ad6111b98d8899b2ded50cdca043cc3
checksums.yaml.gz.sig CHANGED
Binary file
data/ext/extconf.rb CHANGED
@@ -50,7 +50,9 @@ if have_header('sys/epoll.h')
50
50
  $srcs << "io/event/selector/epoll.c"
51
51
  end
52
52
 
53
- if have_header('sys/event.h')
53
+ # The order matters, because we MUST have EV_UDATA_SPECIFIC.
54
+ # The `have_header` call is just to add the -D to the compiler flags.
55
+ if have_const('EV_UDATA_SPECIFIC', 'sys/event.h') and have_header('sys/event.h')
54
56
  $srcs << "io/event/selector/kqueue.c"
55
57
  end
56
58
 
@@ -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.3"
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.3
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-04 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