[Unison-hackers] [unison-svn] r499 - in trunk/src: . lwt/generic

vouillon at seas.upenn.edu vouillon at seas.upenn.edu
Tue Aug 7 12:24:45 EDT 2012


Author: vouillon
Date: 2012-08-07 12:24:45 -0400 (Tue, 07 Aug 2012)
New Revision: 499

Modified:
   trunk/src/RECENTNEWS
   trunk/src/lwt/generic/lwt_unix_impl.ml
   trunk/src/mkProjectInfo.ml
   trunk/src/test.ml
Log:
* Fix bug in Lwt_unix.sleep


Modified: trunk/src/RECENTNEWS
===================================================================
--- trunk/src/RECENTNEWS	2012-05-24 10:22:14 UTC (rev 498)
+++ trunk/src/RECENTNEWS	2012-08-07 16:24:45 UTC (rev 499)
@@ -1,3 +1,8 @@
+CHANGES FROM VERSION 2.45.11
+
+* Fix bug in Lwt_unix.sleep
+
+-------------------------------
 CHANGES FROM VERSION 2.45.9
 
 * Added some more debugging code in transfer.ml

Modified: trunk/src/lwt/generic/lwt_unix_impl.ml
===================================================================
--- trunk/src/lwt/generic/lwt_unix_impl.ml	2012-05-24 10:22:14 UTC (rev 498)
+++ trunk/src/lwt/generic/lwt_unix_impl.ml	2012-08-07 16:24:45 UTC (rev 499)
@@ -128,8 +128,10 @@
           ([], [], [])
         else
           try
-            let res = Unix.select infds outfds [] delay in
-            if delay > 0. && !now <> -1. then now := !now +. delay;
+            let (readers, writers, _) as res =
+              Unix.select infds outfds [] delay in
+            if delay > 0. && !now <> -1. && readers = [] && writers = [] then
+              now := !now +. delay;
             res
           with
             Unix.Unix_error (Unix.EINTR, _, _) ->

Modified: trunk/src/mkProjectInfo.ml
===================================================================
--- trunk/src/mkProjectInfo.ml	2012-05-24 10:22:14 UTC (rev 498)
+++ trunk/src/mkProjectInfo.ml	2012-08-07 16:24:45 UTC (rev 499)
@@ -73,3 +73,4 @@
 
 
 
+

Modified: trunk/src/test.ml
===================================================================
--- trunk/src/test.ml	2012-05-24 10:22:14 UTC (rev 498)
+++ trunk/src/test.ml	2012-08-07 16:24:45 UTC (rev 499)
@@ -370,7 +370,7 @@
       check "4" R2 (Dir ["x", File "foo"]);
     );
 
-  raise (Util.Fatal "Skipping some tests -- remove me!\n"); 
+  (raise (Util.Fatal "Skipping some tests -- remove me!\n") : unit); 
 
   if bothRootsLocal then 
     runtest "backups 1 (local)" ["backup = Name *"] (fun() -> 



More information about the Unison-hackers mailing list