Original Post
Hi,
What's the best way to make less important threads consume less CPU? Searching for the word "thread" isn't very helpful because all forum threads are named "thread".
I'm using boost's threads but they can't be assigned a priority as far as I can see. Should I just sleep them?
Basically, I got a thread that talks on a COM port. The device it talks to is slow and sometimes takes 1-2 seconds to respond. I don't want the application to halt when it talks to the device, but I couldn't care less if the response gets to the user a few seconds later than usual. Would a low priority thread help here? Or sleeping a few seconds each loop?
Do I make sense?
Thanks!
What's the best way to make less important threads consume less CPU? Searching for the word "thread" isn't very helpful because all forum threads are named "thread".
I'm using boost's threads but they can't be assigned a priority as far as I can see. Should I just sleep them?
Basically, I got a thread that talks on a COM port. The device it talks to is slow and sometimes takes 1-2 seconds to respond. I don't want the application to halt when it talks to the device, but I couldn't care less if the response gets to the user a few seconds later than usual. Would a low priority thread help here? Or sleeping a few seconds each loop?
Do I make sense?
Thanks!