Project

General

Profile

Feature #16597 » 0012-Update-extension.rdoc-for-rb_fd_select.patch

michals (Michal Suchánek), 05/29/2020 05:52 PM

View differences:

doc/extension.rdoc
Returns true if a given FD is set in the rb_fdset_t, false if not.
Analogous to FD_ISSET(3).
int rb_thread_fd_select(int nfds, rb_fdset_t *readfds, rb_fdset_t *writefds, rb_fdset_t *exceptfds, struct timeval *timeout) ::
int rb_thread_fd_select(int nfds, rb_fdset_t *readfds, rb_fdset_t *writefds, rb_fdset_t *exceptfds, rb_fdset_t *errorfds, struct timeval *timeout, _Bool select_iface) ::
Analogous to the select(2) system call, but allows other Ruby
threads to be scheduled while waiting.
When USE_POLL is non-zero errorfds can be used to pass in set of file
descriptors to poll for errors, and select_iface can be set to false to
return descriptor error as bit in the array rather than an exception.
When only waiting on a single FD, favor rb_io_wait_readable,
rb_io_wait_writable, or rb_wait_for_single_fd functions since
they can be optimized for specific platforms (currently, only Linux).
(13-13/14)