From: "ioquatix (Samuel Williams)" Date: 2022-03-22T05:23:24+00:00 Subject: [ruby-core:108012] [Ruby master Feature#18566] Merge `io-wait` and `io-nonblock` gems into core IO Issue #18566 has been updated by ioquatix (Samuel Williams). > wait_readable and wait_writable are maybe okay. > No attendee knows what wait_priority is. For reading `MSG_OOB` data. > The name ready? sounds weird because it does not say "what is ready". Maybe renaming is needed. (ready_to_read? or what not?) Some of this method should be deprecated/removed IMHO. > nread is clearly a very bad name. The use case is neither clear. nobu (Nobuyoshi Nakada), who introduced the method, said that he himself regretted its introduction. Agree. > akr (Akira Tanaka) was against to make io/nonblock built-in because it is a old-style interface for nonblock IOs. He recommended IO#read_nonblock and IO#write_nonblock instead of the gem. There are a lot of use cases for `wait_readable` (`accept`, `connect` etc) and probably some for `wait_writable` (`connect`?). It's not just for reading and writing. ---------------------------------------- Feature #18566: Merge `io-wait` and `io-nonblock` gems into core IO https://bugs.ruby-lang.org/issues/18566#change-96969 * Author: byroot (Jean Boussier) * Status: Open * Priority: Normal ---------------------------------------- I think we should reconsider status of `io-wait`, and consider simply merging it into core's `IO`. According to @nobu it's only a gem for "historical" reasons. Any non trivial IO code will likely make use of it, and it's just 400 lines of code. Recently with the extraction of `net-protocol`, it was added add a dependency and that caused Ruby 3.1 compatibility issues with some gems (e.g. with [`mail`](https://github.com/mikel/mail/pull/1439)). ### Proposal - Merge `io-wait` into `io.c` for Ruby 3.2 - Remove `io-wait` as a dependency of all gems maintained by `ruby-core` (e.g. `net-protocol`). - Publish a new `io-wait` version that is simply an empty gem. - Add a `lib/io/wait.rb` stub, with eventually a deprecation warning. cc @eregon @headius @mame @ioquatix -- https://bugs.ruby-lang.org/ Unsubscribe: