Boost logo

Boost Users :

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


Hi Vincente,

I successfully updated to the latest boost in my project but (for some
reason) I still encounter the same problem.

My thread is created thus:

boost::thread::attributes attrs;

pthread_attr_setschedpolicy(attrs.native_handle(), SCHED_RR);

sendThread = boost::thread(attrs,&sender::sendItThreadFunction,this);

 
but upon compilation time I get the following error in bind.hpp:

template<class F, class A> void operator()(type<void>, F & f, A & a, int){
    unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); ///
Error: Type 'boost::thread_attributesΠdoes not provide a call operator

}

I compared this call with the one from the old bind.hpp (of version 1.45)
and noticed that both are equal.

Now I wonder if I am still messing it up or if something else is probably
wrong.

Please let me know.

Thanks,

best

Alex

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

>
>
> Le 07/12/14 18:04, Alexander Carôt a écrit :
>
>
>>
>>
>>
>>
>> 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.
>>
>>
>>
>>
> Just done
> (https://github.com/boostorg/thread/commit/063b59e511a2bfd323b0fcdd06c3499473f
> a18db).
>
>
> Thanks for reporting,
> Vicente
>
> _______________________________________________ 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