IO.select
with single argument detected RB-DS1003IO.select
statements can get very hard to make them compatible with Ruby 3 scheduler. It is recommended to use wait_readable
or wait_writable
on an IO
object with a given timeout instead of rescuing an IO::WaitReadable
or IO::WaitWritable
error and using IO.select
in the block.
IO.select([io], [], [], timeout)
io.wait_readable(timeout)
IO.select([], [io], [], timeout)
io.wait_writable(timeout)