Browse Source

Give explicit arguments to Monitor.try_with.

The defaults are about to change from

    ~rest:`Log ~run:`Schedule
to

    ~rest:`Raise ~run:`Now

This patch preserves the current behavior.

Signed-off-by: Arseniy Alekseyev <aalekseyev@janestreet.com>
Arseniy Alekseyev 1 year ago
parent
commit
50643d4210
1 changed files with 4 additions and 1 deletions
  1. 4 1
      async/faraday_async.ml

+ 4 - 1
async/faraday_async.ml

@@ -22,7 +22,10 @@ let serialize t ~yield ~writev =
       yield t >>= fun () -> loop t
     | `Close -> return ()
   in
-  try_with ~extract_exn:true (fun () -> loop t)
+  try_with
+    ~rest:`Log (* consider [`Raise] instead *)
+    ~run:`Schedule (* consider [`Now] instead *)
+    ~extract_exn:true (fun () -> loop t)
   >>| function
     | Result.Ok () -> ()
     | Result.Error exn ->