Re: When to call g_thread_init(), again...

Am Fri, 15 Aug 2008 15:45:29 +0300
schrieb "Tor Lillqvist" <tml iki fi>:

> > 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.

I think both is rather open for missunderstandings actually, before and
after the improvement of the g_thread_init documentation.
g_mem_set_vtable clearly asserts that it must be called *before
anything else* and so does g_thread_init.

There is no ambiguity with regard to when g_thread_init should be
called as I see it. At best it's paradox that one is supposed to call
two functions before each other, ie. before any Glib function.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]