diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2021-06-19 13:47:16 +1200 |
---|---|---|
committer | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2021-06-22 22:48:57 +1200 |
commit | 45e65f302b663b2c6ab69df06d3b6f219c1797b2 (patch) | |
tree | adf0ed3b3b9c92626f2c21a320ecdf66998b4c27 /thread.c | |
parent | 3deb5d7113e1fd6e4b468e09464d524d390d811e (diff) |
Deprecate and rework old (fd) centric functions.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4592
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 33 |
1 files changed, 0 insertions, 33 deletions
@@ -4296,39 +4296,6 @@ do_select(VALUE p) return (VALUE)result; } -static void -rb_thread_wait_fd_rw(int fd, int read) -{ - int result = 0; - int events = read ? RB_WAITFD_IN : RB_WAITFD_OUT; - - thread_debug("rb_thread_wait_fd_rw(%d, %s)\n", fd, read ? "read" : "write"); - - if (fd < 0) { - rb_raise(rb_eIOError, "closed stream"); - } - - result = rb_wait_for_single_fd(fd, events, NULL); - if (result < 0) { - rb_sys_fail(0); - } - - thread_debug("rb_thread_wait_fd_rw(%d, %s): done\n", fd, read ? "read" : "write"); -} - -void -rb_thread_wait_fd(int fd) -{ - rb_thread_wait_fd_rw(fd, 1); -} - -int -rb_thread_fd_writable(int fd) -{ - rb_thread_wait_fd_rw(fd, 0); - return TRUE; -} - static rb_fdset_t * init_set_fd(int fd, rb_fdset_t *fds) { |