Merge pull request #19992 from bigfacebear/use_stricter_memory_order_in_client_idle_filter

use stricter memory order in client_idle_filter
pull/20025/head
Qiancheng Zhao 5 years ago committed by GitHub
commit edb807954a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/core/ext/filters/client_idle/client_idle_filter.cc

@ -320,7 +320,7 @@ void ChannelData::IdleTimerCallback(void* arg, grpc_error* error) {
// EnterIdle() operation finishes, preventing mistakenly entering IDLE
// when active RPC exists.
finished = chand->state_.CompareExchangeWeak(
&state, PROCESSING, MemoryOrder::RELAXED, MemoryOrder::RELAXED);
&state, PROCESSING, MemoryOrder::ACQUIRE, MemoryOrder::RELAXED);
if (finished) {
chand->EnterIdle();
chand->state_.Store(IDLE, MemoryOrder::RELAXED);

Loading…
Cancel
Save