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
This commit is contained in:
normal 2018-07-23 00:51:51 +00:00
parent 0c32ffc72d
commit 2ff8562169

View File

@ -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);
}