Picos_lwtSourceDirect style Picos compatible interface to Lwt for OCaml 5.
This basically gives you an alternative direct style interface to programming with Lwt. All the scheduling decisions will be made by Lwt.
âšī¸ This is a system independent interface to Lwt. See Picos_lwt_unix for a Unix specific interface.
Signature for a module that Picos_lwt.run requires for interoperating with the system that Lwt runs on.
run (module System) main runs the main program implemented in Picos as a promise with Lwt as the scheduler using the given System module. In other words, the main program will be run as a Lwt promise or fiber.
âšī¸ Inside main you can use anything implemented in Picos for concurrent programming. In particular, you only need to call run with a System module implementation at the entry point of your application.
The optional forbid argument defaults to false and determines whether propagation of cancelation is initially allowed.
â ī¸ This may only be called on the main thread on which Lwt runs.