Commit 3308d335 authored by gejun's avatar gejun

change memory fence in choose_one_group

parent f653f2c9
......@@ -204,7 +204,7 @@ int TaskControl::add_workers(int num) {
}
TaskGroup* TaskControl::choose_one_group() {
const size_t ngroup = _ngroup.load(butil::memory_order_relaxed);
const size_t ngroup = _ngroup.load(butil::memory_order_acquire);
if (ngroup != 0) {
return _groups[butil::fast_rand_less_than(ngroup)];
}
......
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