Yes and yes. I added merge_to_iter to the MCE example.
MCE follows a bank-teller queuing model when processing input. A slow chunk will not delay or block subsequent chunks. Each chunk comes with a $chunk_id value which is beneficial for preserving output order. Out of order items from gathering are held temporarily until ordered items arrive.
MCE processes immediately. Thus, the pre-processing step to split the file into parts is not necessary.
I applied a correction to the example; $slurp_ref is a scalar reference, thus print $fh $$slurp_ref;
There merge_to_iter (the iterator itself) is executed by the manager process while running.
In reply to Re^3: Wait for individual sub processes
by marioroy
in thread Wait for individual sub processes [SOLVED]
by crackerjack.tej
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |