Hi everyone,
i am experiencing random problems here if i use g_main_loop_quit from a
different thread than where the GMainLoop runs.
my program looks like this:
1. in main: create a new context and a new loop
2. spawn a thread
3. call g_main_loop_run in the thread on the previously created loop
Armin Bauer wrote:
Hi everyone,
i am experiencing random problems here if i use g_main_loop_quit from a
different thread than where the GMainLoop runs.
my program looks like this:
1. in main: create a new context and a new loop
2. spawn a thread
3. call g_main_loop_run in the thread on the
Tristan Van Berkom wrote:
My guess is that it just doent make sence to remove the mainloop
while the other thread is sleeping in poll(), sure the code will lock
its mutex and everything; but when the other thread wakes up;
how could it deal with a gone mainloop ?
Scratch that; doesnt make any
Armin Bauer wrote:
Is this a known problem or am i doing something wrong?
Heh, I think I figured it out; I think that after calling
g_main_loop_quit();
if the thread is sleeping, you'll have to call g_main_context_wakeup() on
it for _run() to return; I wonder if that is a bug or should be
Tristan Van Berkom wrote:
Armin Bauer wrote:
Is this a known problem or am i doing something wrong?
Heh, I think I figured it out; I think that after calling
g_main_loop_quit();
if the thread is sleeping, you'll have to call g_main_context_wakeup() on
it for _run() to return; I