Re: Stupid question regarding g_thread_init() and gtk_threads_init()
- From: Sven Neumann <sven gimp org>
- To: Arnaud Charlet <charlet ACT-Europe FR>
- Cc: NavEcos <ecos navosha com>, gtk-list gnome org
- Subject: Re: Stupid question regarding g_thread_init() and gtk_threads_init()
- Date: 27 Jul 2004 12:34:42 +0200
Hi,
Arnaud Charlet <charlet ACT-Europe FR> writes:
> > > Why are there two functions for this? Why doesn't
> > > g_thread_init() call gtk_threads_init()?
> >
> > g_thread_init() is part of GLib and GLib doesn't know anything about
> > GTK+. You don't seriously expect the lower level library to call
> > functions in the higher level library, do you?
>
> On the other hand, gdk_threads_init could very well call g_thread_init,
> which would make things simpler for the users, rather than checking
> explicitely and complaining :-)
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.
Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]