🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

linux Sleep

Started by
1 comment, last by Wolfdog 16 years, 10 months ago
There are a few places that I want to cause a thread to give up its quantum. This is cross-platform so in Windows I am using Sleep, in linux I want to use usleep but cannot find any resources to confirm that this will switch executing threads or will just busy-wait. All I seem to get from the man page is that it will wait for at least the given time, and perhaps more.
Advertisement
Might pthread_yield be suitable?
Quote: Original post by Null and Void
Might pthread_yield be suitable?
Yes Sir! Much better solution, thank you.

This topic is closed to new replies.

Advertisement