parallel
parallel copied to clipboard
Awaiting on worker pool to be empty.
Using amp/parallel v2.
Is there a more sensible way to wait/await for the worker pool to become empty? Maybe a helper function hidden somewhere?
Currently using:
while(($pool->getWorkerCount() - $pool->getIdleWorkerCount()) > 0) {
delay(0.1);
}
A helper function in the default pool along the lines of getActiveWorkerCount() $pool->getWorkerCount() - $pool->getIdleWorkerCount() would also be a nice addition. :)