Re: Gthreads again

2006-04-24 Thread Tristan Van Berkom
Fernando Apesteguía wrote: And how to kill the gthread if there is not something like pthread_cancel? (Thanks for your patience) Tell the thread it has to exit o through a variable & mutex/condition o through any form of ipc (maybe simply a pipe()) call g_thread_join() from the main thr

Re: Gthreads again

2006-04-24 Thread Tristan Van Berkom
Fernando Apesteguía wrote: 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? Wrong, the main thread is not r

Re: Gthreads again

2006-04-24 Thread Tristan Van Berkom
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 wh