http://qs1969.pair.com?node_id=1104524


in reply to Re: Can Perl write multiple files at the same time?
in thread Can Perl write multiple files at the same time?

But ithreads are now discouraged, which leaves you with fork. You might try opening all 6 files at once and writing one block at a time to each of them -- that might work ok, depending on how your os does buffering.

No it doesn't, that just nonsense, don't spread it around Re^2: Splitting large array for threads.

  • Comment on Re^2: Can Perl write multiple files at the same time?

Replies are listed 'Best First'.
Re^3: Can Perl write multiple files at the same time?
by no_slogan (Deacon) on Oct 21, 2014 at 07:07 UTC
    And who are you that we should take your word for it, even though you provide no reasoning behind your statement?

      And who are you that we should take your word for it, even though you provide no reasoning behind your statement?

      Hmm, does it matter who I am no_slogan ?

      In what way do I not provide reasoning?

      Did you read the link I linked? Something more than the perldelta entry?

      fork doesn't work on windows, threads do work on windows, and they also work on other OS ... sure threads have caveats, and sure there are lot of stupid ways to try to use threads, this is not a reason to discourage threads ;;; being tired of watching people try to use threads wrong and ask for help, isn't a valid reason to discourage the use of threads ... or encourage fork

      parroting FUD is FUD

        parroting FUD is FUD

        Amen!


        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.

        The perl porters aren't "a bunch of irc burnouts" as you claim, they're smart guys with a long-range plan for what they're trying to do with the language. That plan apparently doesn't have ithreads in it, but we hope they come up with a better version of threading.

        Now the fork thing is the first actual argument you've provided, but

        On some platforms such as Windows, where the fork() system call is not available, Perl can be built to emulate fork() in the Perl interpreter.

        Maybe building with fork emulation isn't as common as I thought, though? I don't know.