Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation for IO#timeout and related functions. #9527

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions include/ruby/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,9 @@ VALUE rb_io_wait(VALUE io, VALUE events, VALUE timeout);
* }
* ```
*
* On timeout, ::RUBY_Qfalse is returned. Unless you are specifically handling
* the timeouts, you should typically raise ::rb_eIOTimeoutError in this case.
*
* @param[in] error System errno.
* @param[in] io An IO object to wait.
* @param[in] events An integer set of interests.
Expand All @@ -974,10 +977,6 @@ VALUE rb_io_wait(VALUE io, VALUE events, VALUE timeout);
* @retval RUBY_Qfalse Operation timed out.
* @retval Otherwise Actual events reached.
*
* @internal
*
* This function to return ::RUBY_Qfalse on timeout could be unintended. It
* seems timeout feature has some rough edge.
*/
VALUE rb_io_maybe_wait(int error, VALUE io, VALUE events, VALUE timeout);

Expand Down