ocaml-lwt

How to synchronously execute an Lwt thread

佐手、 提交于 2021-01-29 21:37:23
问题 Is there any way to synchronously execute a thread made with Lwt library? To be specific, I am trying to run a series of post requests to a server that compute some value and returns a result. Based on answers provided to this question: How do I make a simple GET request in OCaml? I can make it with either low level approach (sockets) or using the Cohttp library. The low level approach has the advantage of being immediate and straightforward but I would rather stick to the Cohttp (no need for