Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix for TSAN-reported data-race in coro::timed_wait
Summary: TSAN aborts on a data-race of the form: ``` WARNING: ThreadSanitizer: data race (pid=978596) Write of size 8 at 0x7b0400000b40 by thread T2: #0 operator delete(void*, unsigned long) <null> #1 folly::coro::timed_wait</*...*/>(/*...*/)::'lambda'(/*...*/)::operator()</*...*/>(/*...*/) const folly/experimental/coro/TimedWait.h:51 Previous atomic write of size 1 at 0x7b0400000b40 by thread T1: #0 __tsan_atomic8_exchange <null> #1 std::atomic<bool>::exchange(bool, std::memory_order) libgcc/include/c++/bits/atomic_base.h:499 #2 folly::coro::timed_wait</*...*/>(/*...*/)::'lambda'(/*...*/)::operator()</*...*/>(/*...*/) const folly/experimental/coro/TimedWait.h:64 ``` Reviewed By: davidtgoldblatt, iahs Differential Revision: D36159450 fbshipit-source-id: 860fcbbc1f689f9e166934f75a2ef60abdcad421
- Loading branch information