Boost logo

Boost Users :

Subject: Re: [Boost-users] Thread prioritization on OSX
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2014-12-06 18:35:40

Le 06/12/14 22:10, Alexander Carôt a écrit :
> Hello all,
> according to this:
> #thread.thread_management.tutorial.attributes
> I tried to change the thread priority to SCHED_RR on OS X via:
> boost::thread::attributes attrs;
> pthread_attr_setschedpolicy(attrs.get_native_handle(), SCHED_RR);
> sendThread = boost::thread(attrs,&sender::sendItThreadFunction,this);
> In that context I noticed that get_native_handle is not known so I used
> attr.native_handle(), which compiled ok but finally threw an error here:
Sorry, the tutorial is wrong. It should be native_handle()
> /boost/boost/bind/bind.hpp:313:9: Type 'boost::thread_attributes' does not
> provide a call operator
Please, could you post the source code and more context of the compile
> I am still using boost 1.45 and wonder if this is the actual problem or if
> something else is wrong.
I will check the code of this version.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at