Commit 58e0e45d authored by TousakaRin's avatar TousakaRin

Modify max_concurrency only if necessary

parent 5098d3d4
......@@ -237,7 +237,9 @@ void GradientConcurrencyLimiter::UpdateConcurrency(int64_t sampling_time_us) {
<< ", failed sample count" << _sw.failed_count
<< ", current_concurrency:" << current_concurrency
<< ", next_max_concurrency:" << next_concurrency;
_max_concurrency.store(next_concurrency, butil::memory_order_relaxed);
if (next_concurrency != max_concurrency) {
_max_concurrency.store(next_concurrency, butil::memory_order_relaxed);
}
}
} // namespace policy
......
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