From: Sebastian B. <sb...@us...> - 2013-12-24 09:13:01
|
Update of /cvsroot/simplemail/simplemail/gtk In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv30865/gtk Modified Files: subthreads.c Log Message: Abort all available threads when cleaning up. Index: subthreads.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/gtk/subthreads.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- subthreads.c 24 Dec 2013 09:12:43 -0000 1.33 +++ subthreads.c 24 Dec 2013 09:12:59 -0000 1.34 @@ -98,7 +98,19 @@ void cleanup_threads(void) { + struct thread_s *t; + + g_mutex_lock(thread_list_mutex); + t = (struct thread_s*)list_first(&thread_list); + while (t) + { + thread_abort(t); + t = (struct thread_s*)node_next(&t->node); + } + g_mutex_unlock(thread_list_mutex); + g_mutex_free(thread_list_mutex); + } /***************************************************************************************/ |