in reply to Re^2: Wait for individual sub processes
in thread Wait for individual sub processes [SOLVED]
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Wait for individual sub processes
by BrowserUk (Patriarch) on Apr 25, 2015 at 14:01 UTC | |
by marioroy (Prior) on Apr 25, 2015 at 14:12 UTC |