Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the MCE CPAN distribution.

Report information
The Basics
Id: 98045
Status: resolved
Priority: 0/
Queue: MCE

People
Owner: Nobody in particular
Requestors: frank.wang [...] validusresearch.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Is there a return mechanism for MCE?
Date: Fri, 15 Aug 2014 10:50:06 -0400
To: "bug-MCE [...] rt.cpan.org" <bug-MCE [...] rt.cpan.org>
From: Frank Wang <frank.wang [...] validusresearch.com>
Hi Mario, Thank you for your MCE module. I tried it recently while my code using Parallel::Loops in strawberry-perl 5.18.2.1 no longer work (which only have one worker active no matter how we set that number). The MCE works perfectly with as much as wanted workers active and even when using one worker it is faster than Parallel::Loops. There is one problem while change to use MCE: in Parallel::Loops there is a share function to pass result back to parents via %hashes or @arrays. I cannot find a similar or replacing mechanism to return back results to parents in MCE. Or there are ones but I just not find them in the documents or examples? Thank you for your attention. Frank Wang Show quoted text
______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com
______________________________________________________________________
Subject: Re: [rt.cpan.org #98045] Is there a return mechanism for MCE?
Date: Fri, 15 Aug 2014 11:24:22 -0400
To: bug-MCE [...] rt.cpan.org
From: Mario Roy <marioeroy [...] gmail.com>
Hi Frank, Have a look at MCE::Loop. https://metacpan.org/pod/MCE::Loop#GATHERING-DATA use MCE::Loop chunk_size => 1, max_workers => 8; The do and gather methods are described here. These methods send data back to the main process and can be called as often as needed. https://metacpan.org/pod/MCE::Core#METHODS-for-WORKERS-only Their is also MCE::Map if wanting to pass data transparently without having to call on ->do or ->gather. https://metacpan.org/pod/distribution/MCE/lib/MCE.pod#MCE-MODELS Let me know if you run into any problems. Mario
Hi Frank, I am resolving this ticket (not a bug). MCE has a return mechanism through MCE->do and MCE->gather. Please feel free to email me at marioeroy @ gmail dot com. Kind Regards, Mario