From 15051ec5dd435c05ee44bbdaf35064166c43c788 Mon Sep 17 00:00:00 2001 From: water111 <48171810+water111@users.noreply.github.com> Date: Thu, 24 Sep 2020 22:15:01 -0400 Subject: [PATCH] Fix high cpu usage from iop thread (#55) * fix crazy cpu usage from iop thread * clang-format --- game/system/iop_thread.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/game/system/iop_thread.cpp b/game/system/iop_thread.cpp index 67998ab879..cb8c22a6b0 100644 --- a/game/system/iop_thread.cpp +++ b/game/system/iop_thread.cpp @@ -91,6 +91,9 @@ void IOP::kill_from_ee() { void IOP::signal_run_iop() { std::unique_lock 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(); }