io-event 1.16.3 → 1.16.4
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/interrupt.rb +9 -5
- data/lib/io/event/version.rb +1 -1
- data/readme.md +4 -4
- data/releases.md +4 -0
- data.tar.gz.sig +0 -0
- metadata +1 -1
- 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: 83f9faed054855a0c3a50ab469f315c1345a8af43641ab6c5630d648763fc55d
|
|
4
|
+
data.tar.gz: 78114e047cd897ed0192c262d099a93baea21d0c30ddb70cd57e4efc73a40889
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7cea5251f1c5b93b0235e2aa6aa69c65913e13de847a535eee21343060f744b2a810eb901b15b82bbb3c9979d60a620d4d89dfba349473ab6836e9c420985b9d
|
|
7
|
+
data.tar.gz: c8752f8a0bc9da0ca37ae420364a564c68ad4cb6020124f767677a854c7d81639e9e6daa46040d8fc575e02a7231ff5409d72833b8eb15ec72684b063b5d92d2
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/io/event/interrupt.rb
CHANGED
|
@@ -14,6 +14,8 @@ module IO::Event
|
|
|
14
14
|
@selector = selector
|
|
15
15
|
@input, @output = ::IO.pipe
|
|
16
16
|
|
|
17
|
+
@output.sync = true
|
|
18
|
+
|
|
17
19
|
@fiber = Fiber.new do
|
|
18
20
|
while true
|
|
19
21
|
if @selector.io_wait(@fiber, @input, IO::READABLE)
|
|
@@ -27,16 +29,18 @@ module IO::Event
|
|
|
27
29
|
@fiber.transfer
|
|
28
30
|
end
|
|
29
31
|
|
|
30
|
-
# Send a
|
|
32
|
+
# Send a single byte interrupt.
|
|
31
33
|
def signal
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
# Ignore.
|
|
34
|
+
# This must not block or enter blocking operations or raise an exception.
|
|
35
|
+
# Note that `Scheduler#unblock` defers exceptions, so `IOError` will not be raised by `@output.close` until later.
|
|
36
|
+
@output.write_nonblock(".", exception: false) rescue nil
|
|
36
37
|
end
|
|
37
38
|
|
|
38
39
|
def close
|
|
40
|
+
# In principle, this should cause the fiber to exit:
|
|
39
41
|
@input.close
|
|
42
|
+
|
|
43
|
+
# This may cause `signal` to raise an exception:
|
|
40
44
|
@output.close
|
|
41
45
|
end
|
|
42
46
|
end
|
data/lib/io/event/version.rb
CHANGED
data/readme.md
CHANGED
|
@@ -18,6 +18,10 @@ Please see the [project documentation](https://socketry.github.io/io-event/) for
|
|
|
18
18
|
|
|
19
19
|
Please see the [project releases](https://socketry.github.io/io-event/releases/index) for all releases.
|
|
20
20
|
|
|
21
|
+
### v1.16.4
|
|
22
|
+
|
|
23
|
+
- Correctly implement `Interrupt#signal` so that it is robust enough to be called by `Scheduler#unblock`.
|
|
24
|
+
|
|
21
25
|
### v1.16.3
|
|
22
26
|
|
|
23
27
|
- Handle `IOError` raised while shutting down the pure Ruby interrupt pipe, so `IO::Event::Interrupt#close` does not leak expected shutdown errors from the interrupt fiber.
|
|
@@ -60,10 +64,6 @@ Please see the [project releases](https://socketry.github.io/io-event/releases/i
|
|
|
60
64
|
|
|
61
65
|
- [Enhanced `IO::Event::PriorityHeap` with deletion and bulk insertion methods](https://socketry.github.io/io-event/releases/index#enhanced-io::event::priorityheap-with-deletion-and-bulk-insertion-methods)
|
|
62
66
|
|
|
63
|
-
### v1.11.2
|
|
64
|
-
|
|
65
|
-
- Fix Windows build.
|
|
66
|
-
|
|
67
67
|
## Contributing
|
|
68
68
|
|
|
69
69
|
We welcome contributions to this project.
|
data/releases.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v1.16.4
|
|
4
|
+
|
|
5
|
+
- Correctly implement `Interrupt#signal` so that it is robust enough to be called by `Scheduler#unblock`.
|
|
6
|
+
|
|
3
7
|
## v1.16.3
|
|
4
8
|
|
|
5
9
|
- Handle `IOError` raised while shutting down the pure Ruby interrupt pipe, so `IO::Event::Interrupt#close` does not leak expected shutdown errors from the interrupt fiber.
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|