|
|
| Do you know where your variables are? | |
| PerlMonks |
Re^7: A new CB readerby marioroy (Prior) |
| on Jul 13, 2019 at 01:45 UTC ( [id://11102764]=note: print w/replies, xml ) | Need Help?? |
|
Hi Tux, In truth, I never imagined for pm-cb-g to support both the -m and -M options. The reason I tested pm-cb-g using MCE::Child was for testing the 3 together Tk, MCE::Child, and MCE::Channel on Windows, Linux, and macOS. Using MCE::Hobo / MCE::Shared. Notice the extra shared-manager process.
Using MCE::Child / MCE::Channel.
Off-topic Q. Why was MCE::Hobo created? A. At the time, I wanted a threads-like parallel module to be included with MCE::Shared. It was also helpful for intense testing of MCE::Shared. Q. Why did I create MCE::Child years later? A. Well, MCE::Channel is new and included with MCE 1.841. I needed something to complement it including running on Perl 5.8. So, I tried making another threads-like parallel module. MCE::Child uses a common MCE::Channel object for IPC versus IPC handled by the shared-manager process. After several attempts, got it to work including running on the Windows platform. Q. Which one to choose? A. MCE::Child is lighter versus MCE::Hobo because not involving the shared-manager process. However, for apps that have shared variables (i.e. shared array, hash, scalar, etc.), then continue using MCE::Hobo. It's a moot point if the shared-manger is already running. Q. What about MCE::Channel->new versus MCE::Shared->queue? A. MCE::Channel involves no manager process and behaves very much like a pipe. It eliminates any concerns for Producer(s) running faster than Consumers. For MCE::Shared, items appended to a shared queue are sent to the shared-manager process where the data resides (i.e. in memory). This means the possibility for Producer(s) to run faster than Consumers. But no worries, MCE::Shared::Queue includes the await method for throttling if ever needed. Regards, Mario
In Section
Perl Monks Discussion
|
|
||||||||||||||||||||||||||||||