Re: Stupid question regarding g_thread_init() and gtk_threads_init()



> If gdk_thread_init() would call g_thread_init() you couldn't use GTK+
> with another library or any code that needs to call g_thread_init()
> before gtk_init(). Doesn't sound like a good idea to me.

That's misleading: gdk_thread_init would call g_thread_init if not already done
(it already checks whether g_thread_init has been called), so that doesn't
prevent you from calling g_thread_init before hand, possibly with
different arguments.

As for not being able to use GTK+ with another library that's not a valid
argument: Gdk depends on glib already for many things, so the dependency
is there, and can't be removed.

Now, I'm sure there must be *some* valid reason for not doing the obvious,
but I don't see what this reason would be (and don't see it documented
as part of e.g. gdk_threads_init).

Arno



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