Best practices on mixing Lwt and Async?

Continuing the discussion from Best practice on mixing Async and Lwt?:

how can you do that but the other way round? I tried using using let a_deferred_t = ... in Async.Scheduler.go instead of Lwt_main.run and Lwt_preemptive.detach instead of In_thread.run` but it didn’t work.

Async.Scheduler.go will take over the thread completely. I think you are looking for something like Async.Thread_safe.block_on_async. It’s a bit tricky to use, but I think it fits the bill.