I don't get any missed numbers; I always get 2..11. I moved the wait_all_children() line above the line that prints a newline so that the output is clearer and more consistent:
2 3 4 5 6 7 9 8 10 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 10 9 8 + 11 2 3 4 5 6 7 9 10 11 + 8 2 3 4 5 6 7 9 8 11 + 10 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 9 11 8 + 10 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 8 9 7 11 + 10 2 3 4 5 6 7 9 10 8 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 8 9 7 11 + 10 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 8 9 10 7 + 11 2 3 4 5 6 7 8 10 9 + 11 2 3 4 5 6 7 9 10 8 + 11 2 3 4 5 6 7 8 9 11 + 10 2 3 4 5 6 7 9 10 8 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 8 9 10 + 11 2 3 4 5 6 7 9 10 8 + 11
Doing things in parallel means that you can't guarantee in what order they will finish. Sometimes one process takes a bit longer than the others and so the numbers appear "out of order".
- tye
In reply to Re^4: missing values when using Parallel::ForkManager (order)
by tye
in thread missing values when using Parallel::ForkManager
by plagent
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |