Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: What the flock!? Concurrency issues in file writing.

by BrowserUk (Patriarch)
on Oct 01, 2008 at 21:01 UTC ( [id://714902]=note: print w/replies, xml ) Need Help??


in reply to Re^2: What the flock!? Concurrency issues in file writing.
in thread What the flock!? Concurrency issues in file writing.

If you have to sort the results anyway, just dodge the bullet and have each of your processes write to separate files. Then sort the files into one. You can't sort until you get the last line anyway, so there is no loss of parallelism.

Also, a threaded solution is possible if you are interested.


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.
  • Comment on Re^3: What the flock!? Concurrency issues in file writing.

Replies are listed 'Best First'.
Re^4: What the flock!? Concurrency issues in file writing.
by suaveant (Parson) on Oct 02, 2008 at 14:35 UTC
    I've thought about both of these, and I may actually look into the multiple file option since I could possibly write these subfiles in order, if I tweaked everything right.

    Threading is definately something I have thought of but would be a big change, not to mention getting up to speed on threads :)

                    - Ant
                    - Some of my best work - (1 2 3)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-25 17:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found