Re: use of g_thread_exit



On Mon, 2007-03-26 at 13:37 +0000, jcupitt gmail com wrote:
> On 3/26/07, Pritesh Kumar <priteshkr tataelxsi co in> wrote:
> > NOW  i want to perform a operation in "int main()" function of my
> > application only if the above mentioned thread has exited successfully.
> > is there a way to do this. how can the "int main" know if the created thread
> > has exited or not.
> 
> g_thread_join()?
> 
> http://developer.gnome.org/doc/API/2.0/glib/glib-Threads.html#g-thread-join
> 
> This will block if the thread has not exited yet. You'll need to send
> a "I'm about to exit, please call g_thread_join()" message from the
> worker.

An easy way to do this may be to use g_idle_add() do this notification
to the main thread.

> 
> John
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]