Commits

jhwoodyatt  committed 1754133

A minor change to the commented bits of debugging code in the middle of the
select loop to use [Cf_journal] instead of my [xprintf] hackery.

  • Participants
  • Parent commits 35a933a

Comments (0)

Files changed (1)

File cf/cf_poll.ml

  *---------------------------------------------------------------------------*)
 
 (*
-let xprintf fmt =
-    print_string "[Cf_poll] ";
-    Printf.printf fmt 
+let jout = Cf_journal.stdout
+let _ = jout#setlimit `None
 *)
 
 module Fd_order = struct
     let idling = not (Cf_deque.empty p.p_idle_queue_) in
     match rlist, wlist, xlist with
     | [], [], [] when dt < 0.0 && sigs = [] && not idling ->
-        (*
-        xprintf "selecting: done.\n";
-        flush stdout;
-        *)
+        (* assert (jout#debug "Cf_poll.cycle: done.\n"); *)
         Last
     | _, _, _ when dt = 0.0 ->
         tm_service_ p now;
         More
     | _, _, _ ->
         (*
-        let buf = Buffer.create 32 in
-        Buffer.add_char buf '[';
-        List.iter begin fun n ->
-            Buffer.add_string buf (Printf.sprintf " %d" n);
-        end sigs;
-        Buffer.add_string buf " ]";
-        let sigstr = Buffer.contents buf in
-        xprintf "selecting: dt=%f sigs=%s fdsetlen=(%d,%d,%d)\n"
-            dt sigstr (List.length rlist) (List.length wlist)
-            (List.length xlist);
-        flush stdout;
+        assert begin
+            let buf = Buffer.create 32 in
+            Buffer.add_char buf '[';
+            List.iter begin fun n ->
+                Buffer.add_string buf (Printf.sprintf " %d" n);
+            end sigs;
+            Buffer.add_string buf " ]";
+            let sigstr = Buffer.contents buf in
+            jout#debug "Cf_poll.cycle: dt=%f sigs=%s fdsetlen=(%d,%d,%d)\n"
+                dt sigstr (List.length rlist) (List.length wlist)
+                (List.length xlist);
+        end;
         *)
         let save = Unix.sigprocmask Unix.SIG_UNBLOCK sigs in
         let event =