|
-
August 12th, 2009, 08:10 PM
#5
Re: How long will Sleep sleep?
Keep in mind that sleep is an approximate wait period.
Since any threads with higher priority are scheduled before threads of lower priority, a lower priority thread may effectively continue to 'sleep' even after the sleep period has expired. This is because the scheduler will continue to run the higher priority threads until they've finished their work before scheduling the lower priority thread. If the sleep value in the lower priority thread has expired, then it will run (but this could be well after the intended sleep period).
All that being said, generally there is little reason to use sleep.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|