builat has asked for the wisdom of the Perl Monks concerning the following question:

Hello monks.
Reality is cruel stuff. So the day came when I need reinvent the wheel.
I need write a simple script with multythread elements. What the best way to do it, wich module shuld I use for it? I do't want redo my job many times so belive that the collective intelligence of the monastery show me the way to a better solution.

Replies are listed 'Best First'.
Re: Multythread script. The best way.
by BrowserUk (Patriarch) on Nov 02, 2013 at 05:57 UTC
    I need write a simple script with multythread elements. What the best way to do it,

    Dunno!

    The best way might be Coro. Or it might be fork. Or it might be AnyEvent. Or it might be POE. Or it might be threads.

    Can you guess what we need to know before we can make a rational judgement about which is likely to be best for your purpose?


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      In fact, you've already answered my question. Now I know what and where to read. We are talking about the specific treatment of the strength and aerodynamic data. Thank you.
        Now I know what and where to read.

        Okay, great. But that doesn't seem to be making best use of the "collective intelligence of the monastery".

        We are talking about the specific treatment of the strength and aerodynamic data.

        So, you are looking to distribute cpu-intensive numerical calculations over multiple cores?

        If yes, then you can probably avoid having to read half or more of those.

        Will there be a final phase of the processing that will need to consolidate the partial calculations from the distributed subsets? If so, we can probably reduce your search to one or two possibilities.

        Are you looking to run this on one multi-cored box or distribute it over several or many boxes? A completely different subset of the list will be applicable in that case.

        but ....


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.