Sleep( 0 )

Joined
Oct 9, 2009
Messages
9
Reaction score
0
Hi All
I am writing a multi-threaded program consuming a lot of CPU.
In order to reduce this consumption in Windows OS, putting a Sleep( 0 ) or Sleep( 1 ) will cause the switch to other running processes so that the CPU consumption will reduce a bit.
Do you know if in Linux can I do the same? And if I can't do you know how to achieve that?
Kind Regards
AFG
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top