
2013/8/18 Vicente J. Botet Escriba
I think we can provide a minimal future abstraction that can be used with other execution contexts, but it would need to have as parameter the associated mutex and condition_variable abstraction, otherwise I don't see how we can do it.
That's exactly what I've had in mind. namespace boost { namespace futures { template< typename R, typename Mtx, typename Cnd > class future; }} boost.thread: template< typename R > typedef futures::future< R, mutex, condition_variable > future; // uses threads thread, mutex and condition_vairable ,... are defined in the 'boost' namespace (which is an exception to other boost-libs). boost.fiber: namespace boost { namespace fibers { template< typename R > typedef futures::future< R, mutex, condition_variable > future; // uses fibers }}