Module Lwt_preemptive


module Lwt_preemptive: sig .. end
When called by a preemptive thread, undetach f a will ask the main Lwt thread to execute f a. Exceptions are ignored.

val detach : ('a -> 'b) -> 'a -> 'b Lwt.t
val undetach : ('a -> 'b Lwt.t) -> 'a -> unit
When called by a preemptive thread, undetach f a will ask the main Lwt thread to execute f a. Exceptions are ignored.
val yield : unit -> unit Lwt.t
yield () is a threads which suspends itself and then resumes as soon as possible and terminates. It will let the other Lwt threads work, but not always the browser. So if you want for example to update the page, use Lwt_obrowser.yield instead (which is slower, however).
val run : 'a Lwt.t -> 'a