Module Lwt_glib

module Lwt_glib : sig..end

Glib integration



This modules is intended to allow the use of Lwt in GTK applications.

If you are using GTK and Lwt in the same application, then you must call Lwt_glib.‚Äčinstall at the beginning of you program.

val install : ?mode:[ `glib_into_lwt | `lwt_into_glib ] -> unit -> unit

Install the Glib<->Lwt integration.

If mode is `glib_into_lwt then glib will use the Lwt main loop, and if mode is `lwt_into_glib then Lwt will use the Glib main loop.

The first mode is better but for some unknown reason it does not work under Windows, so the second is used as default on Windows while the first one is used as default on Unix.

If the integration is already active, this function does nothing.

val remove : unit -> unit

Remove the Glib<->Lwt integration.