# wait for thread pool to empty $pool->join();