From 3add3db797c4216423fdaa4bef6e2ee3c7630303 Mon Sep 17 00:00:00 2001 From: Luke Gruber Date: Fri, 12 Dec 2025 14:47:43 -0500 Subject: Fewer calls to `GET_EC()` and `GET_THREAD()` (#15506) The changes are to `io.c` and `thread.c`. I changed the API of 2 exported thread functions from `internal/thread.h` that didn't look like they had any use in C extensions: * rb_thread_wait_for_single_fd * rb_thread_io_wait I didn't change the following exported internal function because it's used in C extensions: * rb_thread_fd_select I added a comment to note that this function, although internal, is used in C extensions. --- include/ruby/internal/intern/select.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/ruby/internal') diff --git a/include/ruby/internal/intern/select.h b/include/ruby/internal/intern/select.h index 6ba84c6e63..ba75213618 100644 --- a/include/ruby/internal/intern/select.h +++ b/include/ruby/internal/intern/select.h @@ -72,6 +72,8 @@ struct timeval; * someone else, vastly varies among operating systems. You would better avoid * touching an fd from more than one threads. * + * NOTE: this function is used in native extensions, so change its API with care. + * * @internal * * Although any file descriptors are possible here, it makes completely no -- cgit v1.2.3