g_thread_init question
- From: "Alan M. Evans" <ame1 extratech com>
- To: gtk-app-devel-list gnome org
- Subject: g_thread_init question
- Date: Wed, 01 Jun 2005 11:05:59 -0700
Hello all!
The docs on developer.gnome.org state that g_thread_init() will abort if
called twice and suggest the following construct to avoid multiple
calls:
if (!g_thread_supported ()) g_thread_init (NULL);
Has nobody noticed that there's a race condition there?
If I make a class that internally uses threads and mutexes, how do I
protect myself against another class (not necessarily mine) created in
another thread (not necessarily under my control) also calling
g_thread_init() because it is also internally using gthread?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]