Gthreads again

2006-04-24 Thread Fernando Apesteguía
Hi, I wrote a mail some time ago, but nobody answered me :( My problem is that I had two threads. The second one was a pthread. I performed and exit from a callback, so I had to pthread_cancel the secondary thread to avoid a race condition and an eventual app crash. Now, I'm using GThreads. I

Gthreads again

2006-04-24 Thread Fernando Apesteguía
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

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

Gthreads again

2006-04-24 Thread Fernando Apesteguía
And how to kill the gthread if there is not something like pthread_cancel? (Thanks for your patience) Best regards -- Forwarded message -- From: Tristan Van Berkom [EMAIL PROTECTED] Date: 24-abr-2006 20:04 Subject: Re: Gthreads again To: Fernando Apesteguía [EMAIL PROTECTED] Cc

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