Re: Thread safety with Glib function get_dispatch()
- From: Chris Vine <chris cvine freeserve co uk>
- To: Ryan H <amishibly gmail com>
- Cc: gtk-list gnome org
- Subject: Re: Thread safety with Glib function get_dispatch()
- Date: Sun, 19 Oct 2014 16:33:48 +0100
On Sun, 19 Oct 2014 10:01:58 -0400
Ryan H <amishibly gmail com> wrote:
Might be a silly question, but had to ask- with the presence of a
static variable within get_dispatch(), is it really thread safe? Or
is there some other protection in place that I missed?
As far as I recall the GPrivate stuff is thread local. In addition, the
glib main loop is stated to be thread safe in the documentation. If
you have doubts, and scepticism is a good attribute for a programmer,
look at the source for the implementation of GPrivate (you must have
begun looking at the source in a limited way already to find the
get_dispatch() function, which is not exported).
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]