summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-23 00:51:51 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-23 00:51:51 +0000
commit2ff85621690f4f5b0dff9226ac68418a950a6919 (patch)
treef383ec1b57a34bef874d37b0bed335bba4202350
parent0c32ffc72d76a1ee445ce89c5f6deab4bc630c9b (diff)
thread.c (rb_thread_fd_select): remove unnecessary rb_fd_resize calls
There's no need to resize each rb_fdset_t to match the size of the biggest one. This can allow some small memory savings if watching several sets of FDs simultaneously. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--thread.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/thread.c b/thread.c
index 6181a75ae6..7b8d87ca79 100644
--- a/thread.c
+++ b/thread.c
@@ -3965,15 +3965,6 @@ rb_thread_fd_select(int max, rb_fdset_t * read, rb_fdset_t * write, rb_fdset_t *
return 0;
}
- if (read) {
- rb_fd_resize(max - 1, read);
- }
- if (write) {
- rb_fd_resize(max - 1, write);
- }
- if (except) {
- rb_fd_resize(max - 1, except);
- }
return do_select(max, read, write, except, timeout);
}