提交 4f9948d0 编写于 作者: M Megvii Engine Team

chore(mbg/core): add MGB_WORKER_SHORT_SPIN env variable to set short spin

GitOrigin-RevId: c757dc36d381d10844aeb835f800ed7839d9e907
上级 4f527af4
......@@ -80,6 +80,12 @@ size_t SCQueueSynchronizer::max_spin() {
return cached_max_spin = std::numeric_limits<size_t>::max();
}
if (auto spin_string = MGB_GETENV("MGB_WORKER_MAX_SPIN")) {
auto spin = std::stoi(spin_string);
mgb_log_warn("worker would execute with spin of %d", spin);
return cached_max_spin = spin;
}
std::atomic_bool start{false}, stop{false};
size_t cnt;
double cnt_time;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册