This revision was automatically updated to reflect the committed changes.
Closed by commit rL340608: [libc++] Remove race condition in std::async
(authored by ldionne, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D51170?vs=162200&id=
ldionne added inline comments.
Comment at: libcxx/include/future:556
bool __has_value() const
{return (__state_ & __constructed) || (__exception_ != nullptr);}
jfb wrote:
> I'm not auditing everything, but it seems like code above can still access
jfb accepted this revision.
jfb added inline comments.
This revision is now accepted and ready to land.
Comment at: libcxx/include/future:556
bool __has_value() const
{return (__state_ & __constructed) || (__exception_ != nullptr);}
I'm not auditi
ldionne created this revision.
ldionne added a reviewer: mclow.lists.
Herald added a reviewer: EricWF.
Herald added subscribers: cfe-commits, dexonsmith, christof.
The state associated to the future was set in one thread (with synchronization)
but read in another thread without synchronization, wh