Re: g_thread_init core dumps called before gtk_init (bug ?)
- From: Olexiy Avramchenko <ath beast stu cn ua>
- To: Hugo Hallqvist <hugha495 student liu se>
- Cc: Tristan Van Berkom <vantr touchtunes com>, thomas joseph <thomascanny yahoo co nz>, gtk-app-devel-list gnome org
- Subject: Re: g_thread_init core dumps called before gtk_init (bug ?)
- Date: Wed, 13 Nov 2002 10:49:02 +0200
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]