Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: How can I force thread switching? ( sleep 33 milliseconds)

by Anonymous Monk
on Sep 28, 2013 at 23:18 UTC ( #1056170=note: print w/ replies, xml ) Need Help??


in reply to Re^2: How can I force thread switching?
in thread How can I force thread switching?

I also attempted to wait for 0 unit of time (second or microsecond) to no avail. The null delay is probably detected somewhere and optimised out.

BrowserUk says yield is a mistake (like sleep 0), so sleep more, like 1/2 (or less) of the minimum time period that you believe it will take, like 33 milliseconds -- seems to hold true on win32, good rule of thumb :)


Comment on Re^3: How can I force thread switching? ( sleep 33 milliseconds)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2014-08-28 02:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (255 votes), past polls