Threads
- From: Russell Shaw <rjshaw netspace net au>
- To: gtk-app-devel-list gnome org
- Subject: Threads
- Date: Wed, 15 Dec 2004 19:37:02 +1100
Hi,
In the faq on threads (http://www.gtk.org/faq/#AEN482), there is:
int
main (int argc, char *argv[])
{
GtkWidget *window;
/* init threads */
g_thread_init(NULL);
gdk_threads_init();
/* init gtk */
gtk_init(&argc, &argv);
window = create_window();
gtk_widget_show(window);
gdk_threads_enter();
gtk_main();
gdk_threads_leave();
return 0;
}
Because gdk_threads_enter()/leave() surround gtk_main(), then
wouldn't that mean other threads that use gdk_threads_enter()/leave()
are always blocked until gtk_main() exits?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]