io-event 1.15.0 → 1.15.1
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/io/event/selector/select.rb +2 -25
- data/lib/io/event/version.rb +1 -1
- data/license.md +1 -0
- data.tar.gz.sig +0 -0
- metadata +3 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5db30a4256189f38905a8d50619cc742cc466b3422c8354fac9c35f932d1f4c8
|
|
4
|
+
data.tar.gz: cd00d800af5e758815f74977853f8c6c1f15bb6e273522702defc94252a6c638
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7378ff502bd4f723d9ef57c26450849bf30f43bb1aabe91f6e240b3809dacf48e9a2958654af210ac4010d2fbc64b2f316ff06f07e40abeda1400f4e44e686a8
|
|
7
|
+
data.tar.gz: 71c4efc9997888e71ef13380ae16c27dc79280f7c34dd7c09cd17cfc87af410bd88bec2e074d79a356e03fc12f17eec1c298d178874579be22c6b4d1904e055e
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -288,14 +288,13 @@ module IO::Event
|
|
|
288
288
|
duration = 0
|
|
289
289
|
end
|
|
290
290
|
|
|
291
|
-
closed = nil
|
|
292
291
|
readable = Array.new
|
|
293
292
|
writable = Array.new
|
|
294
293
|
priority = Array.new
|
|
295
294
|
|
|
296
295
|
@waiting.delete_if do |io, waiter|
|
|
297
296
|
if io.closed?
|
|
298
|
-
|
|
297
|
+
# When an IO is closed, we silently drop it. Ruby 4's `rb_thread_io_close_interrupt` will take care of interrupting any fibers waiting on the closed IO, so we don't need to do anything here.
|
|
299
298
|
true
|
|
300
299
|
else
|
|
301
300
|
waiter.each do |fiber, events|
|
|
@@ -316,14 +315,6 @@ module IO::Event
|
|
|
316
315
|
end
|
|
317
316
|
end
|
|
318
317
|
|
|
319
|
-
closed&.each do |waiter|
|
|
320
|
-
waiter.each do |fiber, _|
|
|
321
|
-
fiber.raise(IOError, "closed stream") if fiber.alive?
|
|
322
|
-
rescue
|
|
323
|
-
# The fiber didn't handle the exception; it is now terminated.
|
|
324
|
-
end
|
|
325
|
-
end
|
|
326
|
-
|
|
327
318
|
duration = 0 unless @ready.empty?
|
|
328
319
|
error = nil
|
|
329
320
|
|
|
@@ -348,22 +339,8 @@ module IO::Event
|
|
|
348
339
|
end
|
|
349
340
|
|
|
350
341
|
if error
|
|
351
|
-
# `IO.select` can raise both IOError and Errno::EBADF when one of the given IOs is closed. In that case, we enumerate all waiting IOs to find the closed one(s) and raise on their waiters. Then, we return 0 so the event loop retries cleanly.
|
|
352
342
|
if error.is_a?(IOError) || error.is_a?(Errno::EBADF)
|
|
353
|
-
closed
|
|
354
|
-
@waiting.delete_if do |io, waiter|
|
|
355
|
-
if io.closed?
|
|
356
|
-
waiter.each{|fiber, _| closed << fiber if fiber.alive?}
|
|
357
|
-
true
|
|
358
|
-
end
|
|
359
|
-
end
|
|
360
|
-
|
|
361
|
-
closed.each do |fiber|
|
|
362
|
-
fiber.raise(IOError, "closed stream")
|
|
363
|
-
rescue
|
|
364
|
-
# The fiber didn't handle the exception; it is now terminated.
|
|
365
|
-
end
|
|
366
|
-
|
|
343
|
+
# This can happen if an IO is closed while we're blocked in ::IO.select. Ruby 4's `rb_thread_io_close_interrupt` will take care of interrupting any fibers waiting on the closed IO, so we don't need to do anything here, except try again:
|
|
367
344
|
return 0
|
|
368
345
|
end
|
|
369
346
|
|
data/lib/io/event/version.rb
CHANGED
data/license.md
CHANGED
|
@@ -16,6 +16,7 @@ Copyright, 2025, by Luke Gruber.
|
|
|
16
16
|
Copyright, 2026, by William T. Nelson.
|
|
17
17
|
Copyright, 2026, by Stan Hu.
|
|
18
18
|
Copyright, 2026, by John Hawthorn.
|
|
19
|
+
Copyright, 2026, by Italo Brandão.
|
|
19
20
|
|
|
20
21
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
21
22
|
of this software and associated documentation files (the "Software"), to deal
|
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.15.
|
|
4
|
+
version: 1.15.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samuel Williams
|
|
@@ -14,6 +14,7 @@ authors:
|
|
|
14
14
|
- Alex Matchneer
|
|
15
15
|
- Anthony Ross
|
|
16
16
|
- Delton Ding
|
|
17
|
+
- Italo Brandão
|
|
17
18
|
- John Hawthorn
|
|
18
19
|
- Luke Gruber
|
|
19
20
|
- Pavel Rosický
|
|
@@ -120,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
120
121
|
- !ruby/object:Gem::Version
|
|
121
122
|
version: '0'
|
|
122
123
|
requirements: []
|
|
123
|
-
rubygems_version:
|
|
124
|
+
rubygems_version: 3.6.9
|
|
124
125
|
specification_version: 4
|
|
125
126
|
summary: An event loop.
|
|
126
127
|
test_files: []
|
metadata.gz.sig
CHANGED
|
Binary file
|