Beefy Boxes and Bandwidth Generously Provided by pair Networks httptech
XP is just a number
 
PerlMonks  

Re: How can I force thread switching?

by Anonymous Monk
on Sep 29, 2013 at 12:39 UTC ( #1056214=note: print w/ replies, xml ) Need Help??


in reply to How can I force thread switching?

Put the jobs into a queue with no capacity-issues, such as a shared database table. Then, redesign the system so that the threads live forever, retrieving work and doing it until told to stop. The job-scheduling and job-output activities should also be handled by threads. The parent's only duties are to watch the kids.


Comment on Re: How can I force thread switching?
Re^2: How can I force thread switching?
by BrowserUk (Pope) on Sep 29, 2013 at 12:55 UTC

    Ignore this 'advice'. It's garbage. (You're foolin' noone.)

    Update: I was asked to explain why it is garbage.

    It is garbage because sundia anonymous monk suggests:

    Then, redesign the system so that the threads live forever, retrieving work and doing it until told to stop.

    Which is stupid, because that is exactly what the OPs code does.

    This guy cannot even read code. It should be possible to take out injunctions against morons like him.


    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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (12)
As of 2014-04-23 09:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (541 votes), past polls