GTK and threaded applications
- From: kornelix <kornelix yahoo de>
- To: gtk app dev mail list <gtk-app-devel-list gnome org>
- Subject: GTK and threaded applications
- Date: Tue, 31 Jan 2006 18:28:08 +0100
Following the guidelines in the FAQ, I constructed my application
threads as follows:
gdk_threads_enter(); // enter thread
(do some work, including GTK calls)
gdk_flush(); // exit thread
gdk_threads_leave();
return 0;
Now my multi-threaded application executes its threads one after the
other, instead of in parallel. Apparently the above method introduces a
lock or mutex which allows only one thread at a time to execute.
Is this a hopeless situation, or is there some other way?
(other than putting all GTK calls in the main program)
thanks,
Mike
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]