Re: g_thread_init core dumps called before gtk_init (bug ?)



Hugo Hallqvist wrote:

----- Original Message -----
From: Tristan Van Berkom <vantr touchtunes com>
Date: Tuesday, November 12, 2002 3:58 pm
Subject: Re: g_thread_init core dumps called before gtk_init (bug ?)

This doesn't seem right:

gdk_threads_enter();
gtk_main();
gdk_threads_leave();

you're aquiring a lock before the main loop
so none of your calls to gdk_threads_enter()
should succeed untill gtk_main_quit();



It is correct. I use it in my own threaded gtk-programs, and also the documentation says so.
However I fail to see the error in the code, will come back about it.

It is correct for multi-threaded applications, not for single-threaded.
The example of code, posted above is single-threaded, so Tristan is
right - there will be the deadlock with pthreads fast muteces.

Olexiy





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