On Thu, Nov 20, 2014 at 10:27:42AM +0100, Alexander CarĂ´t wrote:
Hello all,
is it correct that boost does not offer thread prioritization ?
I am dealing with an application with a number of threads, which all depend on the realtime-scheduled sound card callback thread.
These threads must have the same realtime scheduling priority.
Is there a way to achieve this ?
If BOOST_THREAD_DEFINES_THREAD_ATTRIBUTES_NATIVE_HANDLE is defined, boost::thread has a native_handle_type and a native_handle() function. You can use those (pthread_t, HANDLE, whatnot) with your native platform functionality of choice to adjust thread priority, if such a concept exists. A reason it doesn't exist in Boost is because not all platforms has an uniform "priority" system with the same kind of absolute/relative priorities and tiers. -- Lars Viklund | zao@acc.umu.se