Sorry for writing this as an issue.
I could not figure out how it is ment to wait for all Tasks to finish.
If i use stop - the Threads get deleted and the threadpool ends.
Isn't there something like p.WaitForEverythingDone()?
Currently I use this in the main thread:
while (p.n_idle() < THREAD_COUNT )
{
}
But thats not really a good idea to burn 1 cpu core just for waiting?