module GtkThread: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.
With system threads, the ocaml giant lock is now released on
polling, so that other ocaml threads can run without busy wait.val main : unit -> unitbusy_waiting to true forces the main loop to be
non-blocking. This is required with VM threads.
The default value is set to true at startup if the environment
variable LABLGTK_BUSY_WAIT is set to something other than 0.val busy_waiting : bool Pervasives.refval start : unit -> Thread.tval thread_main : unit -> unitmain
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 -> 'bval gui_safe : unit -> boolGlib.Timeout.add ~ms:100 ~callback:GtkThread.do_jobsval do_jobs : unit -> bool
val set_do_jobs_delay : float -> unitbusy_waiting is true.
Higher value will make the application less CPU-consuming,
but (relatively) less reactive.
Default value is 0.013 .