Boost logo

Boost Users :

Subject: Re: [Boost-users] Thread prioritization on OSX
From: Alexander Carôt (Alexander_Carot_at_[hidden])
Date: 2014-12-07 12:04:21


Hello Vincente,

thanks a lot for your quick response !

>>Sorry, the tutorial is wrong. It should be native_handle()

I have one more: On the same document the Thread attributes chapter starts
with the example
attrs.set_size(4096*10);
Her it has to be set_stack_size as in the example below. Maybe you can find
some time to fix it.

>>Done. Thread attributes were included in 1.50 :(
>>P.S. Please, look at the documentation of the version you are using.

Yes ­ sure ! I am not a bloody boost-beginner but still not very experience
with it. So, I just needed confirmation that my guess is correct.
My project is rather complex and deals with a 3rd-party-component for which
I need to update boost now. Hope it¹s gonna work out ­ I might get back on
this.

Thanks again,
best

Alex

Von: "Vicente J. Botet Escriba" <vicente.botet_at_[hidden]>
Antworten an: <boost-users_at_[hidden]>
Datum: Sonntag, 7. Dezember 2014 00:40
An: <boost-users_at_[hidden]>
Betreff: Re: [Boost-users] Thread prioritization on OSX

>
>
> Le 07/12/14 00:35, Vicente J. Botet Escriba a écrit :
>
>
>> Le 06/12/14 22:10, Alexander Carôt a écrit :
>>
>>> Hello all,
>>>
>>> according to this:
>>>
>>> http://www.boost.org/doc/libs/1_57_0/doc/html/thread/thread_management.html
>>> #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
>> error?
>>
>>> 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.
>>
>>
>>
> Done. Thread attributes were included in 1.50 :(
>
> Version 3.0.0 - boost 1.50
> New Features:
>
> * #2741 Proposal to manage portable and non portable thread attributes.
>
>
> Best,
> Vicente
>
> P.S. Please, look at the documentation of the version you are using.
>
> _______________________________________________ Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net