$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] Boost.Fiber mini-review September 4-13
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2015-09-05 20:08:49
Le 05/09/15 04:38, Oliver Kowalke a écrit :
> 2015-09-05 0:53 GMT+02:00 Giovanni Piero Deretta <gpderetta_at_[hidden]>:
>
>
>> or
>>
>> 2) boost::fiber::future is simply a tiny wrapper over
>> boost::thread::future that overrides the wait policy.
>>
> the futures of boost.thread and boost.fiber differ efectivly only in the
> type
> of mutex and condition_variable (implementing the suspend/resume mechanism
> for threads/fibers)
>
> a base implementation of future has to take the types of mutex and
> condition_variable
> as template arg.
>
> template< typename T, typename Mutex, typename Condition >
> class base_future<> {
> };
>
> template< typename T >
> using future = base_future< T, boost::mutex, boost::condition_variable >;
> // boost.thread
>
> template< typename T >
> using future = base_future< T, boost::fibers::mutex,
> boost::fibers::condition_variable >; // boost.fiber
>
>
While this can be useful to have a common implementation, I don't think
it solves the issue if interaction with different implementation of some
concept Future.
Vicente