lower the cpu cost in open-source mini-mode
This commit is contained in:
@ -88,6 +88,8 @@ void ObLockWaitMgr::destroy()
|
||||
|
||||
void ObLockWaitMgr::run1()
|
||||
{
|
||||
const int interval_us = (lib::is_mini_mode() ? 10 : 1000) * 1000;
|
||||
|
||||
(void)prctl(PR_SET_NAME, "ObLockWaitMgr", 0, 0, 0);
|
||||
while (!has_set_stop() || !is_hash_empty()) {
|
||||
ObLink* iter = check_timeout();
|
||||
@ -97,7 +99,7 @@ void ObLockWaitMgr::run1()
|
||||
(void)repost(cur);
|
||||
}
|
||||
|
||||
usleep(10000);
|
||||
usleep(interval_us);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user