I think, if ($all_cv->ready) { } is required.

begin/end is very good for running concurrent jobs and wait until all jobs to end.
These are sequencial jobs which makes me think, count down is better?