Fix high cpu usage from iop thread (#55)

* fix crazy cpu usage from iop thread

* clang-format
This commit is contained in:
water111
2020-09-24 22:15:01 -04:00
committed by GitHub
parent 2d11e44eaf
commit 15051ec5dd
+3
View File
@@ -91,6 +91,9 @@ void IOP::kill_from_ee() {
void IOP::signal_run_iop() {
std::unique_lock<std::mutex> lk(iters_mutex);
iop_iters_des += 100; // todo, tune this
if (iop_iters_des - iop_iters_act > 500) {
iop_iters_des = iop_iters_act + 500;
}
iop_run_cv.notify_all();
}