Is there any possibility to check if a thread is still running? Using join isn't really what I need, because I want a setup a bit like this:
pthread_t thread_id;
while(true){
do_stuff();
if(!thread_id || is_finished(thread_id){
pthread_create(&thread_id, NULL, do_stuff_with_the_above_stuff, NULL);
}
//Else continue to do_stuff() for another round
}