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

ruby-changes:30714

From: usa <ko1@a...>
Date: Tue, 3 Sep 2013 11:28:21 +0900 (JST)
Subject: [ruby-changes:30714] usa:r42793 (trunk): * win32/win32.c (rb_w32_select_with_thread): rounding up the fraction of

usa	2013-09-03 11:28:14 +0900 (Tue, 03 Sep 2013)

  New Revision: 42793

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42793

  Log:
    * win32/win32.c (rb_w32_select_with_thread): rounding up the fraction of
      tv_usec instead of rounding down.
      this change is an experiment to get rid of failures on vc10-x64 CI.

  Modified files:
    trunk/ChangeLog
    trunk/win32/win32.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42792)
+++ ChangeLog	(revision 42793)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Sep  3 11:23:57 2013  NAKAMURA Usaku  <usa@r...>
+
+	* win32/win32.c (rb_w32_select_with_thread): rounding up the fraction of
+	  tv_usec instead of rounding down.
+	  this change is an experiment to get rid of failures on vc10-x64 CI.
+
 Tue Sep  3 11:00:28 2013  NAKAMURA Usaku  <usa@r...>
 
 	* win32/win32.c (do_select): constify timeout.
Index: win32/win32.c
===================================================================
--- win32/win32.c	(revision 42792)
+++ win32/win32.c	(revision 42793)
@@ -2960,7 +2960,7 @@ rb_w32_select_with_thread(int nfds, fd_s https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L2960
 		    if (!rb_w32_time_subtract(&rest, &now)) break;
 		    if (compare(&rest, &wait) < 0) dowait = &rest;
 		}
-		Sleep(dowait->tv_sec * 1000 + dowait->tv_usec / 1000);
+		Sleep(dowait->tv_sec * 1000 + (dowait->tv_usec + 999) / 1000);
 	    }
 	}
     }

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

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