Boost logo

Boost :

Subject: Re: [boost] Futures (was: Re: [compute] Some remarks)
From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2015-01-13 12:27:37


On Mon, Jan 12, 2015 at 4:50 PM, Giovanni Piero Deretta
<gpderetta_at_[hidden]> wrote:
>
> Hi Neal,
>
> I have been following the thread with interest, and I wanted to know
> more about your non-allocating future/promise pair. As far as I
> understand, your future and promise have a pointer to each other and
> they update the other side every time they are moved, right?
>

That's how I did it. I think Niall did similar.
A fairly complete (if untested) implementation fits on a single slide:
slide 154 of https://github.com/boostcon/cppnow_presentations_2013/blob/master/mon/future_promise.pdf?raw=true
from C++Now 2013 https://www.youtube.com/watch?v=QkkyiRtmQ5M

Tony


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