Re: use of g_thread_exit

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

 



On Mon, 2007-03-26 at 13:37 +0000, jcupitt@xxxxxxxxx wrote:
> On 3/26/07, Pritesh Kumar <priteshkr@xxxxxxxxxxxxxxx> 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@xxxxxxxxx
> http://mail.gnome.org/mailman/listinfo/gtk-list
> 

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux