Commit 920147ee authored by Tim Janik's avatar Tim Janik Committed by Tim Janik

clarify section about gdk_threads_enter/ gdk_threads_leave to be reworded

Thu Jul 12 18:12:04 2007  Tim Janik  <timj@imendio.com>

        * gdk/tmpl/threads.sgml: clarify section about gdk_threads_enter/
        gdk_threads_leave to be reworded in terms of events and to mention
        availability of gdk_threads_add_idle_full().



svn path=/trunk/; revision=18457
parent c3bb9a4f
Thu Jul 12 18:12:04 2007 Tim Janik <timj@imendio.com>
* gdk/tmpl/threads.sgml: clarify section about gdk_threads_enter/
gdk_threads_leave to be reworded in terms of events and to mention
availability of gdk_threads_add_idle_full().
2007-07-11 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkrange.sgml:
......
......@@ -31,12 +31,14 @@ You must call g_thread_init() and gdk_threads_init() before executing
any other GTK+ or GDK functions in a threaded GTK+ program.
</para>
<para>
Idles, timeouts, and input functions are executed outside
of the main GTK+ lock. So, if you need to call GTK+
inside of such a callback, you must surround the callback
with a gdk_threads_enter()/gdk_threads_leave() pair.
(However, signals are still executed within the main
GTK+ lock.)
Idles, timeouts, and input functions from GLib, such as g_idle_add(), are
executed outside of the main GTK+ lock.
So, if you need to call GTK+ inside of such a callback, you must surround
the callback with a gdk_threads_enter()/gdk_threads_leave() pair or use
gdk_threads_add_idle_full() which does this for you.
However, event dispatching from the mainloop is still executed within
the main GTK+ lock, so callback functions connected to event signals
like GtkWidget::button-press-event, do not need thread protection.
</para>
<para>
In particular, this means, if you are writing widgets that might
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment