Boost logo

Boost :

Subject: Re: [boost] [thread] Dividing into Boost.Thread and Boost.Sync
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2013-08-19 01:57:31


2013/8/18 Vicente J. Botet Escriba <vicente.botet_at_[hidden]>

> 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

}}


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