1. Yit Phang Khoo
  2. Adapton.ocaml

Commits

Yit Phang Khoo  committed 79cc2d1

Minor refactoring to remove set_eager_now from EagerSATotalOrder.

  • Participants
  • Parent commits 493ccb3
  • Branches default

Comments (0)

Files changed (1)

File Source/Adapton/EagerSATotalOrder.ml

View file
  • Ignore whitespace
     let eager_now = ref eager_start
     let eager_finger = ref eager_start
 
-    let set_eager_now timestamp =
-        eager_now := timestamp
-
     let add_timestamp () =
         let timestamp = TotalOrder.add_next !eager_now in
-        set_eager_now timestamp;
+        eager_now := timestamp;
         timestamp
 
     let rec dequeue () =
         let rec refresh () =
             let meta = dequeue () in
             let last_finger = !eager_finger in
-            set_eager_now meta.start_timestamp;
+            eager_now := meta.start_timestamp;
             eager_finger := meta.end_timestamp;
             meta.evaluate ();
             TotalOrder.splice !eager_now meta.end_timestamp;
                             && TotalOrder.compare m.meta.start_timestamp !eager_now > 0
                             && TotalOrder.compare m.meta.end_timestamp !eager_finger < 0 ->
                         TotalOrder.splice !eager_now m.meta.start_timestamp;
-                        set_eager_now m.meta.end_timestamp;
+                        eager_now := m.meta.end_timestamp;
                         m
                     | _ ->
                         let m = thunk (fun () -> f memo x) in