Commit 5a370151 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Use relaxed order for EventBase::loopThread_

Summary:
[Folly] Use `relaxed` order for `EventBase::loopThread_` consistently. There is only one location which uses a different memory order.

Atomic operations on this location do not guard any other locations, so non-`relaxed` memory orders are not required.

Reviewed By: andriigrynenko

Differential Revision: D18722614

fbshipit-source-id: b73b61e4845c34c58e9f4adbeb368c815b375d38
parent 964cde07
...@@ -306,7 +306,7 @@ bool EventBase::loopBody(int flags, bool ignoreKeepAlive) { ...@@ -306,7 +306,7 @@ bool EventBase::loopBody(int flags, bool ignoreKeepAlive) {
std::chrono::microseconds busy; std::chrono::microseconds busy;
std::chrono::microseconds idle; std::chrono::microseconds idle;
loopThread_.store(std::this_thread::get_id(), std::memory_order_release); loopThread_.store(std::this_thread::get_id(), std::memory_order_relaxed);
if (!name_.empty()) { if (!name_.empty()) {
setThreadName(name_); setThreadName(name_);
......
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