Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Where does the 6th process come from?

by karlgoethebier (Abbot)
on Apr 22, 2017 at 17:03 UTC ( [id://1188628]=note: print w/replies, xml ) Need Help??


in reply to Re: Where does the 6th process come from?
in thread Where does the 6th process come from? [SOLVED]

"...unless threads is present"

Thank you very much marioroy!

But threads is present:

karls-mac-mini:monks karl$ cpanm threads threads is up to date. (2.15)

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»

Furthermore I consider that Donald Trump must be impeached as soon as possible

Replies are listed 'Best First'.
Re^3: Where does the 6th process come from?
by marioroy (Prior) on Apr 22, 2017 at 17:53 UTC

    ... if present meaning if threads is loaded inside the script.

    use threads; ...

    On Unix platforms including Cygwin, one can use threads and threads::shared alongside MCE::Shared. In that case, MCE::Shared spawns a thread for the shared-manager. For the Windows platform, the MCE modules loads threads automatically for extra stability.

    Below, more clarity for the recommended modules.

    (Q) Why is Sereal loaded transparently?

    (A) The main reason is for extra performance. To ensure minimum memory consumption, there's no reason to load the Storable module if Sereal is available in Perl. This is handled transparently.

    (Q) Why is IO::FDPass beneficial?

    (A) Being able to construct a shared condvar, handle, or queue while the shared-manager is running greatly adds to the ease-of-use. These involve handles behind the scene. Basically, am able to send the relevant fd descriptors to the shared-manager. Without FDPass, one must be careful to construct these shared objects first and later start the shared-manager manually.


      Ahh! I begin to see it clearly now. It works as expected:

      use strict; use warnings; use threads; use threads::shared; use MCE::Hobo; use MCE::Shared; use feature qw(say); # ... stuff # !!! procs at pending: karl31075,20,1246243212240s000S+7:55pm0:00.08perl./hobo.pl karl31150,00,000s000Z+7:55pm0:00.00(perl) karl31140,00,000s000Z+7:55pm0:00.00(perl) karl31130,00,000s000Z+7:55pm0:00.00(perl) karl31120,00,000s000Z+7:55pm0:00.00(perl) procs after join: karl310723,10,1247164812260s000S+7:55pm0:00.09perl./hobo.pl

      Secret knowledge from The Masonic Lodge Of Parallelism.

      Best regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

      Furthermore I consider that Donald Trump must be impeached as soon as possible

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1188628]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-19 13:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found