module Lwt_main:sig
..end
val run : 'a Lwt.t -> 'a
run t
calls the Lwt scheduler repeatedly until t
terminates,
then returns the value returned by the thread. It t
fails with
an exception, this exception is raised.
Note that you should avoid using run
inside threads
run
returns.run
are serialized: an
invocation of run
will not terminate before all
subsequent invocations are terminated.run
in a function
registered with Pervasives.at_exit
, use the Lwt_main.at_exit
function of this module instead.val yield : unit -> unit Lwt.t
yield ()
is a threads which suspends itself and then resumes
as soon as possible and terminates.val enter_iter_hooks : (unit -> unit) Lwt_sequence.t
val leave_iter_hooks : (unit -> unit) Lwt_sequence.t
val exit_hooks : (unit -> unit Lwt.t) Lwt_sequence.t
Notes:
val at_exit : (unit -> unit Lwt.t) -> unit
at_exit hook
adds hook at the left of exit_hooks