This code blocks the main process for a long time while waiting for the jobs to end or while accumulating the results.
Is there a so