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

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

by Anonymous Monk
on Oct 21, 2014 at 06:52 UTC ( #1104524=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2019-06-18 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (81 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!