Re: gdk threads ...
- From: Chris Vine <chris cvine freeserve co uk>
- To: Paul Davis <paul linuxaudiosystems com>
- Cc: Gtk Hackers <gtk-devel-list gnome org>
- Subject: Re: gdk threads ...
- Date: Wed, 25 Apr 2012 20:47:26 +0100
On Wed, 25 Apr 2012 20:28:31 +0100
Chris Vine <chris cvine freeserve co uk> wrote:
> The documentation states: "GLib itself is internally completely
> thread-safe (all global data is automatically locked), but individual
> data structure instances are not automatically locked for performance
> reasons. For example, you must coordinate accesses to the same
> GHashTable from multiple threads. The two notable exceptions from this
> rule are GMainLoop and GAsyncQueue, which are thread-safe and need no
> further application-level locking to be accessed from multiple
> threads. Most refcounting functions such as g_object_ref() are also
> thread-safe."
And this:
"To allow multiple independent sets of sources to be handled in
different threads, each source is associated with a GMainContext. A
GMainContext can only be running in a single thread, but sources can be
added to it and removed from it from other threads."
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]