[PATCH] D51170: [libc++] Remove race condition in std::async

2018-08-24 Thread Louis Dionne via Phabricator via cfe-commits
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=

[PATCH] D51170: [libc++] Remove race condition in std::async

2018-08-24 Thread Louis Dionne via Phabricator via cfe-commits
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

[PATCH] D51170: [libc++] Remove race condition in std::async

2018-08-23 Thread JF Bastien via Phabricator via cfe-commits
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

[PATCH] D51170: [libc++] Remove race condition in std::async

2018-08-23 Thread Louis Dionne via Phabricator via cfe-commits
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