From: "larskanis (Lars Kanis)" <noreply@...>
Date: 2022-03-29T10:39:36+00:00
Subject: [ruby-core:108104] [Ruby master Feature#18655] Merge `IO#wait_readable` and `IO#wait_writable` into core

Issue #18655 has been updated by larskanis (Lars Kanis).


IMHO the problem with IO#wait is that its return value not well defined. Here is the issue: https://github.com/ruby/io-wait/issues/13

----------------------------------------
Feature #18655: Merge `IO#wait_readable` and `IO#wait_writable` into core
https://bugs.ruby-lang.org/issues/18655#change-97068

* Author: byroot (Jean Boussier)
* Status: Open
* Priority: Normal
----------------------------------------
Extracted from [Feature #18566].

The decision was made to consider the methods from `io-wait` and `io-nonblock` one by one.

I think `wait_readable` and `wait_writeable` should be fairly non-controversial. They're quite essential to use `IO#read_nonblock` and `IO#write_nonblock` effectively.

Proposed patch: https://github.com/ruby/ruby/pull/5694

NB: if we only merge some methods, then `io/wait` must test which methods it needs to define or not. For now I use a `if RUBY_VERSION >= "3.2"` check in `extconf.rb`, but there might be a better approach.




-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>