Boost logo

Boost :

Subject: Re: [boost] [thread] possible raise in future?
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2013-02-03 11:21:22


> both uses are protected with boost::unique_lock<boost::mutex> &lock. Am I
missing something?
>
> Best,
> Vicente

Oh - I see you have already answered.

I'm not shure if reordering is still possible. Var done is not volatile and
because the implementation is in the header it might be inlined.
I don't know if the lock creates something like a memory barrier (happend
before etc.).

I'm using your future implementation - I replaced mutex and condition with
my own implementation (using atomics).
Unit-test which use future do sometimes not return. If I use
condition::wait() instead of future<>::wait() the code works perfect.
Of curse it might be possible that my impl is buggy (but I use simple
spinlock).
What I want to say - I'm uncertain.

best,
Oliver


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