diff --git a/client/cs_prefs.cpp b/client/cs_prefs.cpp index 2bfdacd240..f552d2cccc 100644 --- a/client/cs_prefs.cpp +++ b/client/cs_prefs.cpp @@ -187,13 +187,19 @@ int CLIENT_STATE::check_suspend_processing() { return 0; } + +void print_suspend_tasks_message(int reason) { + msg_printf(NULL, MSG_INFO, "Suspending computation - %s", suspend_reason_string(reason)); +} + + int CLIENT_STATE::suspend_tasks(int reason) { if (reason == SUSPEND_REASON_CPU_THROTTLE) { if (log_flags.cpu_sched) { msg_printf(NULL, MSG_INFO, "[cpu_sched] Suspending - CPU throttle"); } } else { - msg_printf(NULL, MSG_INFO, "Suspending computation - %s", suspend_reason_string(reason)); + print_suspend_tasks_message(reason); } active_tasks.suspend_all(reason); return 0;