Commit a07a458a authored by Yuchen Dai's avatar Yuchen Dai Committed by Facebook Github Bot

fix atomic::store bad usage

Summary:
Fix usage of atomic::store() where memory order is the only argument.

It worked because of memory_order value is implicit casted to correct value luckily.

Reviewed By: djwatson

Differential Revision: D8108348

fbshipit-source-id: 7c4050b8cb50ec3ab6977cd9adce45249130320c
parent c9ecca96
......@@ -234,7 +234,7 @@ void ThreadPoolExecutor::join() {
n = threadList_.get().size();
removeThreads(n, true);
n += threadsToJoin_.load(std::memory_order_relaxed);
threadsToJoin_.store(std::memory_order_relaxed);
threadsToJoin_.store(0, std::memory_order_relaxed);
}
joinStoppedThreads(n);
CHECK_EQ(0, threadList_.get().size());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment