[前][次][番号順一覧][スレッド一覧]

ruby-changes:51804

From: normal <ko1@a...>
Date: Mon, 23 Jul 2018 09:51:57 +0900 (JST)
Subject: [ruby-changes:51804] normal:r64017 (trunk): thread.c (rb_thread_fd_select): remove unnecessary rb_fd_resize calls

normal	2018-07-23 09:51:51 +0900 (Mon, 23 Jul 2018)

  New Revision: 64017

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64017

  Log:
    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.

  Modified files:
    trunk/thread.c
Index: thread.c
===================================================================
--- thread.c	(revision 64016)
+++ thread.c	(revision 64017)
@@ -3965,15 +3965,6 @@ rb_thread_fd_select(int max, rb_fdset_t https://github.com/ruby/ruby/blob/trunk/thread.c#L3965
 	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);
 }
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]