Boost logo

Boost :

Subject: Re: [boost] [thread] boost::future::then
From: Mikael Olenfalk (mikael.olenfalk_at_[hidden])
Date: 2015-10-10 03:20:10


On Fri, Oct 9, 2015 at 10:01 PM, Vicente J. Botet Escriba <
vicente.botet_at_[hidden]> wrote:

> Le 09/10/15 16:16, Mikael Olenfalk a écrit :
>
>> On Fri, Oct 9, 2015 at 3:44 PM, Vladimir Prus <vladimir.prus_at_[hidden]>
>> wrote:
>>
>> be nicer if promise could have an executor, and pass it to future and then
>>> to futures returned by 'then', so that I only need to to specify custom
>>> behaviour
>>> when creating a promise - that can be easily wrapped in a function.
>>>
>>>
>>> I don't think so, I had a very quick look but didn't see anything.
>>
> See my replay to Vladimir.

Thanks.

Do you have any comments on presence or absence of bugs, and overall API
>>> maturity?
>>> Having to define macros to get useful functionality is not quite perfect.
>>>
>>> I have barely played with it, I got little bit discouraged on using it at
>> work as it required enabled undocumented feature macros.
>
> Please, next time you find things like that please post on this ML or
> create a ticket.
>

Absolutely.

> Anyway, I'm sure that there are a lot of error in the documentation. What
> is not documented for you?

It was mostly the _PROVIDES_EXECUTORS macro which I couldn't find. I tried
to do the following documentation fix:
https://github.com/boostorg/thread/pull/70

>
> Also it seemed to
>> me that it actually didn't compile in VS2015 (which is what I use).
>>
> You know I started this some time ago and deliver the first version for
> boost 1.53 (if Vladimir is right).
> Since then, there have been a lot of compiler versions that have been
> released. We do as much as possible to write portable code, but no MSVC
> version is satisfactory, there is always some feature missing or not
> working completely.
>
> I'm afraid but since more than 3 years I don't have a Windows machine to
> develop, so I can just try and see what the regression said me.
> You can see the results on
> http://www.boost.org/development/tests/develop/developer/thread.html.
> The results are no so bad for MSVC. There are some lambda issues.
>
>
I have a VM on Azure with VS2015 which you can use if you want to, ping me
privately if so.

My
>> guess is that it is very much still experimental code.
>>
> All the executor stuff is really experimental and I have plans to change a
> little bit the interface to adhere to the Concurrency TS (once they decide
> the interface).

Ok.

>> also happen to figure out how to combine it with boost::asio::io_service I
>> would be very interested in hearing your findings, we have a (global)
>> worker-pool-thingie at work which uses io_service and I would like to make
>> boost::async(Executor& ex, C...) work with it so that usage becomes
>> nicer/simpler.
>>
>>
>> Here I am.
>
> Vicente

Do you have a recommendation on how to combine the Executors and Schedulers
with boost::asio::io_service? Wrapping an io_service in an executor is
straightforward but I could not really figure out how to do it for
scheduler.

Regards,

/M


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk