man GtkThread () - The main loop to use with threads.
NAME
GtkThread - The main loop to use with threads.
Module
Module GtkThread
Documentation
Module GtkThread : sig end
The main loop to use with threads. GMain.main does not work! This changes GMain.main to call threaded_main rather than GtkMain.Main.default_main , so subsequent calls will work. The first call sets the GUI thread, and subsequent calls to main will be automatically routed through sync
val main : unit -> unit Start the main loop in a new GUI thread. Do not use recursively.
val start : unit -> Thread.t The real main function
val thread_main : unit -> unit Forget the current GUI thread. The next call to main will register its caller as GUI thread.
val reset : unit -> unit
val async : ('a -> unit) -> 'a -> unit Add an asynchronous job (to do in the main thread) Add a synchronous job (to do in the main thread)
val sync : ('a -> 'b) -> 'a -> 'b Whether it is safe to call most GTK functions directly from the current thread
val gui_safe : unit -> bool