Skip to content

Commit

Permalink
fixup! Try using Lwt_preemptive detached thread.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcgilchrist committed Oct 13, 2023
1 parent 77b106f commit b237ba8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/lib/misc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,15 @@ module PeekerBody = struct
let open Lwt.Syntax in
let* () = Current.Job.start ~level:Current.Level.Mostly_harmless job in
Current.Job.log job "tag: %s" (tag key);
let r : (Docker_hub.t, Docker_hub.fetch_errors) result Lwt.t
= Lwt_preemptive.(detach
(fun () -> run_in_main
(fun _t -> Docker_hub.fetch_manifests ~repo:"ocaml/opam" ~tag:(Some (tag key)))) ()) in
let r : (Docker_hub.t, Docker_hub.fetch_errors) result Lwt.t =
Lwt_preemptive.(
detach
(fun () ->
run_in_main (fun _t ->
Docker_hub.fetch_manifests ~repo:"ocaml/opam"
~tag:(Some (tag key))))
())
in
(* let+ res = *)
(* Docker_hub.fetch_manifests ~repo:"ocaml/opam" ~tag:(Some (tag key)) *)
(* in *)
Expand Down

0 comments on commit b237ba8

Please sign in to comment.