Calling g_main_loop_quit from another thread
- From: Braden McDaniel <braden endoframe com>
- To: gtk-app-devel-list gnome org
- Subject: Calling g_main_loop_quit from another thread
- Date: Sun, 05 Feb 2006 18:08:58 -0500
Is it safe to call g_main_loop_quit from another thread?
I have a GMainLoop that is watching a GIOChannel for input in a thread.
I am trying to end this thread by calling g_main_loop_quit from a
different thread. But when I do this, the thread running the GMainLoop
deadlocks in a call to poll from g_main_context_check.
My workaround for the moment has been to add an idle callback that
checks a boolean flag to the thread running the GMainLoop and call
g_main_loop_quit in the callback function. Though this is rather
annoying; particularly considering calling gtk_main_quit from another
thread seems to work fine.
Is there some way to get the call to g_main_loop_quit from another
thread to work?
--
Braden McDaniel e-mail: <braden endoframe com>
<http://endoframe.com> Jabber: <braden jabber org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]