Re: [boost] [defer/thread_pool] - added again to boost vault

An explicit separation of concepts at this level of abstraction seems useful in terms of recombination into higher level libraries (e.g. ASIO and statechart, futures) and also useful in their own right. Seems analogous to the STL separation of algorithms/iterators/containers which has been deemed a good thing.
Hmm - I would find it useful if defer_point::defer would return an future which could be used to transfer results and/or exceptions back to the caller. regards, oliver

An explicit separation of concepts at this level of abstraction seems useful in terms of recombination into higher level libraries (e.g. ASIO and statechart, futures) and also useful in their own right. Seems analogous to the STL separation of algorithms/iterators/containers which has been deemed a good thing.
<Oliver.Kowalke <at> qimonda.com> writes:
Hmm - I would find it useful if defer_point::defer would return an future which could be used to transfer results and/or exceptions back to the caller.
Yes, that would be very useful. Do you have some code to do that? Should we use code from the existing futures library in the vault? I haven't looked at the asio code for a while. Does it offer futures? Is there scope for making defer_point::defer not only return a future value, but also directly take parameters and eliminate the slightly cumbersome bind steps? e.g. int Add(int a, int b); int one = 1, two = 2; future<int> result = a_deferrer.defer( Add, one, two ); std::cout << result.get(); //or perhaps future<int>result; a_deferrer.defer( result, Add, one, two ); // or maybe defer::do( a_deferrer, result, Add, one, two); Cheers Simon

Simon Meiklejohn wrote:
<Oliver.Kowalke <at> qimonda.com> writes:
Hmm - I would find it useful if defer_point::defer would return an future which could be used to transfer results and/or exceptions back to the caller.
Yes, that would be very useful. Do you have some code to do that? Should we use code from the existing futures library in the vault? I haven't looked at the asio code for a while. Does it offer futures?
What about the Boost.Act SoC project? It's supposed to use "actions" instead of futures but they look to be a superset of futures anyways. IIRC SoC is comming to an end so hopefully we will see something soon. I know I've been waiting to play with it since I read about it.
participants (3)
-
Michael Marcin
-
Oliver.Kowalke@qimonda.com
-
Simon Meiklejohn