module GtkThread:The main loop to use with threads.sig
..end
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
val start : unit -> Thread.t
val thread_main : unit -> unit
main
will register its caller as GUI thread.val reset : unit -> unit
val async : ('a -> unit) -> 'a -> unit
Add a synchronous job (to do in the main thread)
val sync : ('a -> 'b) -> 'a -> 'b
val gui_safe : unit -> bool