Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^4: dynamic number of threads based on CPU utilization

by BrowserUk (Pope)
on Sep 26, 2012 at 16:42 UTC ( #995818=note: print w/ replies, xml ) Need Help??


in reply to Re^3: dynamic number of threads based on CPU utilization
in thread dynamic number of threads based on CPU utilization

.I thought that since the procXml sub worked just fine, it would not be relevant to the discussion or potential solution.

You were mostly right. The only relevance it has is that nowhere in that code do I see any sign of locking (the keyword 'lock' does not appear), which means that multiple threads are writing to a shared hash and there is nothing to prevent them from corrupting data through collisions.

You may 'get away with it', but I wouldn't want to be responsible for when things go wrong.


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.

RIP Neil Armstrong


Comment on Re^4: dynamic number of threads based on CPU utilization

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2014-12-19 07:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (72 votes), past polls