|
168 | 168 | read_task.wait |
169 | 169 | end |
170 | 170 |
|
171 | | - it "can interrupt reading thread when closing from a fiber" do |
172 | | - skip_unless_minimum_ruby_version("3.5") |
| 171 | + # it "can interrupt reading thread when closing from a fiber" do |
| 172 | + # skip_unless_minimum_ruby_version("4") |
173 | 173 |
|
174 | | - r, w = IO.pipe |
| 174 | + # r, w = IO.pipe |
175 | 175 |
|
176 | | - read_thread = Thread.new do |
177 | | - Thread.current.report_on_exception = false |
178 | | - r.read(5) |
179 | | - end |
| 176 | + # read_thread = Thread.new do |
| 177 | + # Thread.current.report_on_exception = false |
| 178 | + # r.read(5) |
| 179 | + # end |
180 | 180 |
|
181 | | - # Wait until read_thread blocks on I/O |
182 | | - Thread.pass until read_thread.status == "sleep" |
| 181 | + # # Wait until read_thread blocks on I/O |
| 182 | + # Thread.pass until read_thread.status == "sleep" |
183 | 183 |
|
184 | | - close_task = Async do |
185 | | - r.close |
186 | | - end |
| 184 | + # close_task = Async do |
| 185 | + # r.close |
| 186 | + # end |
187 | 187 |
|
188 | | - close_task.wait |
| 188 | + # close_task.wait |
189 | 189 |
|
190 | | - expect do |
191 | | - read_thread.join |
192 | | - end.to raise_exception(IOError, message: be =~ /closed/) |
193 | | - end |
| 190 | + # expect do |
| 191 | + # read_thread.join |
| 192 | + # end.to raise_exception(IOError, message: be =~ /closed/) |
| 193 | + # end |
194 | 194 |
|
195 | | - it "can interrupt reading fiber in a new thread when closing from a fiber" do |
196 | | - skip_unless_minimum_ruby_version("3.5") |
197 | | - |
198 | | - r, w = IO.pipe |
199 | | - |
200 | | - read_thread = Thread.new do |
201 | | - Thread.current.report_on_exception = false |
202 | | - read_task = Async do |
203 | | - expect do |
204 | | - r.read(5) |
205 | | - end.to raise_exception(IOError, message: be =~ /closed/) |
206 | | - end |
207 | | - read_task.wait |
208 | | - end |
209 | | - |
210 | | - # Wait until read_thread blocks on I/O |
211 | | - Thread.pass until read_thread.status == "sleep" |
212 | | - |
213 | | - close_task = Async do |
214 | | - r.close |
215 | | - end |
216 | | - close_task.wait |
217 | | - |
218 | | - read_thread.value |
219 | | - end |
| 195 | + # it "can interrupt reading fiber in a new thread when closing from a fiber" do |
| 196 | + # skip_unless_minimum_ruby_version("4") |
| 197 | + |
| 198 | + # r, w = IO.pipe |
| 199 | + |
| 200 | + # read_thread = Thread.new do |
| 201 | + # Thread.current.report_on_exception = false |
| 202 | + # read_task = Async do |
| 203 | + # expect do |
| 204 | + # r.read(5) |
| 205 | + # end.to raise_exception(IOError, message: be =~ /closed/) |
| 206 | + # end |
| 207 | + # read_task.wait |
| 208 | + # end |
| 209 | + |
| 210 | + # # Wait until read_thread blocks on I/O |
| 211 | + # Thread.pass until read_thread.status == "sleep" |
| 212 | + |
| 213 | + # close_task = Async do |
| 214 | + # r.close |
| 215 | + # end |
| 216 | + # close_task.wait |
| 217 | + |
| 218 | + # read_thread.value |
| 219 | + # end |
220 | 220 | end |
221 | 221 |
|
222 | 222 | describe ".select" do |
|
0 commit comments