Hullo, I have a c++ object wrapped around a pthread. It works perfectly. The thread class is connected to a button in a gui. Is there anyway to signal the main gui thread when the processing thread has completed? I can't wait for the thread to terminate as the processing can take up to 30 seconds. I need to use the gui while the thread is processing its data but I would like to know when it finishes. Feels like I need an event or something but I can't find much in the pthread man pages to help me. I did see a reference to pthread_signal but when I looked at the man page for pthread_sigaction I couldn't really make sense of how to use it. Don't think I'm asking too much of pthread, someone in the know help me out?
<Additional>I don't want to have to constantly poll the thread to check its status and placing a reference to the GUI in the thread class would increase coupling a bit too much for my liking.
Ugh I take it this is a synchronization/condition variable problem, nerts.