Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

The two comments are obviously not intended to be so closely related, mine unintended enemy, as anyone who is not “mine unintended enemy” would very plainly understand.   (Do you downvote my posts both as yourself and using some sock-puppet account?   Just curious.)

There are two very-valid points contained in the aforementioned reply:

  1. That you don’t need to futz around with too-much manually written code ... and the bugs and annoyances that go with it, e.g. in the OP’s original solution ... because CPAN is well-equipped with solutions that other folks have already written.
  2. That it is very useful, in any multi-thread or multi-process solution, to use “work to do” queues, with a limited number of workers who consume entries from the queue.   The number of workers is independent from the number of requests that need to be serviced.   An existing CPAN package is employed to implement the queue and all of its perhaps operating-system-specific ugliness.

What, then, is “the point?”   Easy.   At first, you approach this language with the notion that “I have to write this.”   Then, you discover that, thanks to CPAN, you don’t “have to write this.”   You do not have to stumble-around with code that is literally a take-off of Unix fork() when there is, perhaps unbeknownst to you, a package like Parallel::ForkManager at your beck and call.   That’s huge.   But not obvious.

Quite frankly, good sir, your ongoing determination to conduct a vendetta against me clouds your own vision.   I think that even “newbies” are likely to be professional computer programmers who are very able indeed to know when a particular package, cited only as a “for instance,” is or is not appropriate to their particular project.   Yeah, I’ll just betcha that they do know that “threads and processes play by different rules in most operating systems,” without either you or I having any moral obligation to educate them concerning this point.   So perhaps we should all simply trust the newbies on that score, as peculiar as that thought may initially seem.   I will wager that neither you nor I are, in fact, “the smartest kids in this school.”   And, yeah, I am perfectly aware that you have earned many times more experience-points than have I, so I am not presuming that this discussion is “among equals.”


In reply to Re^3: Fork Results in thousands of processes by sundialsvc4
in thread Fork Results in thousands of processes by anshumangoyal

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others cooling their heels in the Monastery: (6)
    As of 2014-08-02 08:12 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Who would be the most fun to work for?















      Results (55 votes), past polls