goru 0.4.0 → 0.4.2
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
- data/CHANGELOG.md +13 -0
- data/lib/goru/channel.rb +1 -1
- data/lib/goru/reactor.rb +1 -0
- data/lib/goru/routines/io.rb +19 -4
- data/lib/goru/scheduler.rb +1 -0
- data/lib/goru/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e51ea3837c3867f3454c5c4794a9a9aca28a5d8e72b199a616a6fe450294e0af
|
4
|
+
data.tar.gz: a7efb9761602db2224ddf2d8c48ba9c89d0e3c872f4b880a6dc4fec7633d4068
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f926d07bd70647ea0b05c3eb78244e234174ba0b720bf13e40178674bb2189e1fffd562a8ae2f7df3f39c86fc2612762caf9e29a3e19128f4dabd510cc08e49
|
7
|
+
data.tar.gz: 025ec84977d4c997f4578a15934420d7060656512b8ba46e02f8b768cd42ec0cf56488234985b0a4d074003f9e0ca1e6e2ce144544b48c123344e7b52c6e31a2
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
## [v0.4.2](https://github.com/bryanp/goru/releases/tag/v0.4.2)
|
2
|
+
|
3
|
+
*released on 2023-09-17*
|
4
|
+
|
5
|
+
* `fix` [#24](https://github.com/bryanp/goru/pull/24) Close the io object when the routine is finished ([bryanp](https://github.com/bryanp))
|
6
|
+
* `fix` [#25](https://github.com/bryanp/goru/pull/25) Handle IOError in the scheduler and reactor ([bryanp](https://github.com/bryanp))
|
7
|
+
|
8
|
+
## [v0.4.1](https://github.com/bryanp/goru/releases/tag/v0.4.1)
|
9
|
+
|
10
|
+
*released on 2023-07-29*
|
11
|
+
|
12
|
+
* `fix` [#23](https://github.com/bryanp/goru/pull/23) Handle `IOError` in io routines ([bryanp](https://github.com/bryanp))
|
13
|
+
|
1
14
|
## [v0.4.0](https://github.com/bryanp/goru/releases/tag/v0.4.0)
|
2
15
|
|
3
16
|
*released on 2023-07-16*
|
data/lib/goru/channel.rb
CHANGED
data/lib/goru/reactor.rb
CHANGED
data/lib/goru/routines/io.rb
CHANGED
@@ -68,8 +68,9 @@ module Goru
|
|
68
68
|
rescue Errno::EAGAIN
|
69
69
|
wait
|
70
70
|
rescue Errno::ECONNRESET, Errno::EPIPE, EOFError
|
71
|
-
|
72
|
-
|
71
|
+
handle_io_unavailable
|
72
|
+
rescue IOError
|
73
|
+
handle_io_unavailable
|
73
74
|
end
|
74
75
|
|
75
76
|
def wait
|
@@ -86,8 +87,9 @@ module Goru
|
|
86
87
|
rescue Errno::EAGAIN
|
87
88
|
wait
|
88
89
|
rescue Errno::ECONNRESET, Errno::EPIPE, EOFError
|
89
|
-
|
90
|
-
|
90
|
+
handle_io_unavailable
|
91
|
+
rescue IOError
|
92
|
+
handle_io_unavailable
|
91
93
|
end
|
92
94
|
|
93
95
|
# [public]
|
@@ -97,6 +99,12 @@ module Goru
|
|
97
99
|
rescue Errno::EAGAIN
|
98
100
|
wait
|
99
101
|
rescue Errno::ECONNRESET, Errno::EPIPE, EOFError
|
102
|
+
handle_io_unavailable
|
103
|
+
rescue IOError
|
104
|
+
handle_io_unavailable
|
105
|
+
end
|
106
|
+
|
107
|
+
private def handle_io_unavailable
|
100
108
|
finished
|
101
109
|
nil
|
102
110
|
end
|
@@ -153,6 +161,13 @@ module Goru
|
|
153
161
|
@reactor.wakeup
|
154
162
|
end
|
155
163
|
|
164
|
+
# [public]
|
165
|
+
#
|
166
|
+
def finished(...)
|
167
|
+
@io.close
|
168
|
+
super
|
169
|
+
end
|
170
|
+
|
156
171
|
private def status_changed
|
157
172
|
case @status
|
158
173
|
when Routine::STATUS_FINISHED
|
data/lib/goru/scheduler.rb
CHANGED
data/lib/goru/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: goru
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Powell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: core-extension
|
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
|
-
rubygems_version: 3.4.
|
124
|
+
rubygems_version: 3.4.17
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
127
|
summary: Concurrent routines for Ruby.
|