aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/io.c b/io.c
index 2199c1aeaa..16f2526e95 100644
--- a/io.c
+++ b/io.c
@@ -1408,6 +1408,18 @@ rb_wait_for_single_fd(int fd, int events, struct timeval *timeout)
return io_wait_for_single_fd(fd, events, timeout);
}
+int
+rb_thread_wait_fd(int fd)
+{
+ return rb_wait_for_single_fd(fd, RUBY_IO_READABLE, NULL);
+}
+
+int
+rb_thread_fd_writable(int fd)
+{
+ return rb_wait_for_single_fd(fd, RUBY_IO_WRITABLE, NULL);
+}
+
VALUE rb_io_maybe_wait(int error, VALUE io, VALUE events, VALUE timeout)
{
switch (error) {