main process waits for the workers in the pool to exit.