How to write a program using Lwt and interacting with a Tk interface. I tried to run the Tk main thread in a Lwt preemptive thread with
let () =
Lwt.async(Lwt_preemptive.detach Tkthread.thread_main);
Lwt_main.run(main Tkthread.top)
where main
constructs the interface and runs a thread updating it. This ends up in the programming crashing with a fatal error (unable to create widget) and after that, a core dump.
What is the correct way to use Lwt and Labltk together?