The main thread is the only one that is running inside the gtk_main loop. The secondary thread is only reading files. So if I do a gtk_main_quit() the secondary thread will be no longer running because I have not a gtk_main loop, right?
If I'm right why I had to explicitly kill the other thread when it was created with pthread instead of g_thread? ---------- Forwarded message ---------- From: Tristan Van Berkom <[EMAIL PROTECTED]> Date: 24-abr-2006 19:21 Subject: Re: Gthreads again To: Fernando Apesteguía <[EMAIL PROTECTED]> Cc: gtk-app-devel-list@gnome.org Fernando Apesteguía wrote: [...] > Now, I'm using GThreads. I don't perform a pthread_cancel nor an equivalent > for GThreads, but the application appears to run well. Does gtk_main_quit() > kill the secondary thread properly or should I expect a crash of my > application? Threads are allowed to run whether there is a GMainLoop, gtk_main() or whatever else running in any other thread; if you are running gtk_main() from a created thread; gtk_main_quit will not kill its own thread. Cheers, -Tristan _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list