darion-yaphet commented on code in PR #3738:
URL: https://github.com/apache/brpc/pull/3738#discussion_r4581554723
##########
src/brpc/event_dispatcher_epoll.cpp:
##########
@@ -94,11 +94,12 @@ int EventDispatcher::Start(const bthread_attr_t*
thread_attr) {
}
bool EventDispatcher::Running() const {
- return !_stop && _event_dispatcher_fd >= 0 && _tid != 0;
+ return !_stop.load(butil::memory_order_acquire) &&
Review Comment:
Why is acquire/release necessary?
If _stop merely indicates the exit without being responsible for releasing
other shared states, then relaxed is already sufficient.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]