diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-23 00:51:51 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-23 00:51:51 +0000 |
commit | 2ff85621690f4f5b0dff9226ac68418a950a6919 (patch) | |
tree | f383ec1b57a34bef874d37b0bed335bba4202350 | |
parent | 0c32ffc72d76a1ee445ce89c5f6deab4bc630c9b (diff) | |
download | ruby-2ff85621690f4f5b0dff9226ac68418a950a6919.tar.gz |
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.c | 9 |
1 files changed, 0 insertions, 9 deletions
@@ -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); } |