Boost logo

Boost :

Subject: Re: [boost] [thread] Alternate future implementation and future islands.
From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2015-03-27 20:06:23


On Fri, Mar 27, 2015 at 5:35 PM, Giovanni Piero Deretta
<gpderetta_at_[hidden]> wrote:
> On Fri, Mar 27, 2015 at 8:24 PM, Gottlob Frege <gottlobfrege_at_[hidden]> wrote:
>>>
>>
>> Just to be clear, my non-allocating promise/future was meant to be
>> more of a proof-of-concept, not necessarily optimal efficiency.
>> I would need to recheck, but I think most of it requires only acquire
>> or release, not full sequential consistency, if that helps. I rarely
>> write anything that requires full sequential consistency.
>>
>
> Hum, I do not think you can implement it with just plain load and
> stores, I think you need at least one RMW there. Probably acq_rel is
> enough for that, but that's no less expensive than seq_cst on x86.
>

You are probably right, but for each move, all you are doing is
publishing where you moved to, so you need a release, and then an
acquire when you want to read that, not acq_rel together on one
operation. But I haven't thought about it since I gave the
presentation!, so I don't know. Maybe I'll have time to think about
it at C++Now, which is coming up soon. (Feels soon to me at least -
more things to prepare...)

Tony


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