c++ - Boost: how to set program priority? -


how set program/thread priority (when talking threads mean ones created using boost library) using boost c++ library? mean crossplatform way...

there's no generalised cross-platform priority support in boost itself.

#ifdef friend...

see tom's answer win32 solution.

on linux you'd use nice call (or possibly setpriority). don't put off document's statements adjust process priority; on linux thread process shares memory space other process/processes. if better version of "top" lists individual threads, can see nice levels of each.

note process/thread normal user privileges can reduce priority (higher "nice" value) on linux. little bit of work priorities i've done on windows, seemed goes (but on xp; situation may different post-vista, uac etc).


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -