Multi-threaded "gtk_main()"s
- From: Nikolaj Kiær Thygesen <Nikolaj Thygesen ciber dk>
- To: <gtk-app-devel-list gnome org>
- Subject: Multi-threaded "gtk_main()"s
- Date: Mon, 16 Jan 2006 12:31:50 +0100
Hey list,
I'm currently writing a multi threaded gtk-app, and knowing that calling gtk_main() simultaneously
from different threads is a no-go, I was quite surprised to find that the following fragment seemed to work
when being accidentally called from a thread different from the one which originally called gtk_main()!!
I have initialized the threading support properly before the initial call to gtk_main() in the main
thread, so I guess gdk_threads_enter() momentarily exits the original gtk_main() - yes??? Is this really
supposed to work, or did I just get lucky???
gdk_threads_enter();
...
gtk_main();
gdk_threads_leave();
br - Nikolaj Thygesen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]