diff --git a/src/utils/test_main.hxx b/src/utils/test_main.hxx index 2504ec543..be1f1a19c 100644 --- a/src/utils/test_main.hxx +++ b/src/utils/test_main.hxx @@ -174,9 +174,7 @@ private: /// Synchronously runs a function in the main executor. void run_x(std::function fn) { - FnExecutable e(std::move(fn)); - g_executor.add(&e); - e.n.wait_for_notification(); + g_executor.sync_run(std::move(fn)); } /** Utility class to block an executor for a while.