Re: When to call g_thread_init(), again...
- From: Paul Davis <paul linuxaudiosystems com>
- To: Tor Lillqvist <tml iki fi>
- Cc: gtk-devel-list gnome org
- Subject: Re: When to call g_thread_init(), again...
- Date: Fri, 15 Aug 2008 08:59:53 -0400
On Fri, 2008-08-15 at 15:45 +0300, Tor Lillqvist wrote:
> > For example, Glib have g_mem_set_vtable() that alose requires to be first.
>
> Whee, so GLib documentation is internally inconsistent then. What a mess.
>
> > Current wording of the g_thread_init() documentation doesn't
> > introduces such ambiguility at least...
>
> It doesn't? I think "You must call g_thread_init() before executing
> any other GLib functions in a threaded GLib program." is pretty
> unambiguous assuming you can decide what "threaded program" means.
>
> Or do you interpret this as "once you have created a thread (thus
> turning your program into a threaded one), you must call
> g_thread_init()" ? I don't think that makes sense.
AmbiguousMan to the rescue:
"If your program uses threads (or other libraries that use threads),
then you must call g_thread_init() before calling any other GLib
function"
--p
ps. optional extra clause: ", including other GLib functions that claim
to want to be called first" :))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]