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

Re^3: problem of my multithreading perl script

by Anonymous Monk
on Jan 11, 2013 at 13:33 UTC ( #1012890=note: print w/replies, xml ) Need Help??


in reply to Re^2: problem of my multithreading perl script
in thread problem of my multithreading perl script

Actually it will run slower. All of the threads are writing to the same hash. For each write, the hash is locked and any other threads have to way until the current thread finishes its write before they can start.

Try having each thread write to a separate hash, then merge them in the main thread once the reading is complete.

  • Comment on Re^3: problem of my multithreading perl script

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012890]
help
Chatterbox?
[Your Mother]: Sure, sure. I had a cat as a kid who always slept on top of the fridge because of the heat dissipation up the back.

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2017-12-18 15:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (492 votes). Check out past polls.

    Notices?