Welcome to the Monastery | |
PerlMonks |
Re: How to set pipe first and then use the forkmanager?by marioroy (Prior) |
on Sep 22, 2016 at 14:23 UTC ( [id://1172369]=note: print w/replies, xml ) | Need Help?? |
Greetings, The following is a demonstration using MCE::Loop and MCE::Shared. MCE::Shared v1.805 or later is required if running via Perl5i on a Unix platform.
The sample code generates the following output. It may differ depending on which worker obtains data first.
On Windows, replace the mce_open line with the following. This will work if Cygwin is installed on the C: drive. The code works with Strawberry Perl, ActiveState Perl, and Cygwin Perl.
Warm regards, Mario.
In Section
Seekers of Perl Wisdom
|
|