Hi!

g_thread_foreach() has been deprecated since Glib 2.32, and I wonder how I
can replace it: I used it to know if a GThread pointer corresponded to a
still "alive" thread.

So I'm looking for some advice on how to check if a GThread (say A) is
still alive while my code executes in another thread (say B). I've thought
about two ways to do this but could find none which seems to work:
1) lock a GMutex at some point when code is executed by A, and in B try to
lock the mutex. I don't think it can work because when A exits, the mutex
remains locked
2) configure thread A to execute a "cleanup" function when it exits (like
atexit), but I don't think it's doeable

Many thanks for any advice here!

Regards,

Vivien
_______________________________________________
gtk-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to