From: Sebastian B. <sb...@us...> - 2013-12-24 09:13:42
|
Update of /cvsroot/simplemail/simplemail/gtk In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv30949/gtk Modified Files: subthreads.c Log Message: Ensure that g_main_loop_quit() is called only on context of the main loop. Index: subthreads.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/gtk/subthreads.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- subthreads.c 24 Dec 2013 09:13:18 -0000 1.35 +++ subthreads.c 24 Dec 2013 09:13:40 -0000 1.36 @@ -245,9 +245,16 @@ /***************************************************************************************/ +static gboolean thread_abort_entry(gpointer udata) +{ + struct thread_s *t = (struct thread_s*)udata; + g_main_loop_quit(t->main_loop); + return 0; +} + void thread_abort(thread_t thread) { - g_main_loop_quit(thread->main_loop); + g_main_context_invoke(thread->context, thread_abort_entry, thread); } /***************************************************************************************/ |