I am serfing the net for 2 hours and I couldn't find the answer.
I am using pthread.
I have jobs to run coming into and I push_back them in a vector and init them.
I want every time that a job comes into to check if some of the other threads is done. All the threads are **not** detached.
I want to clear the jobs that are already done, but if I call wait(), then it will stop the parallel execution!
How can I do that? I am a total beginner in all this!