diff --git a/src/tests/rpp/test_scheduler.cpp b/src/tests/rpp/test_scheduler.cpp index c89b57399..6ec8288a5 100644 --- a/src/tests/rpp/test_scheduler.cpp +++ b/src/tests/rpp/test_scheduler.cpp @@ -360,7 +360,7 @@ TEST_CASE_TEMPLATE("queue_based scheduler", TestType, rpp::schedulers::current_t auto done = std::make_shared(); - worker->schedule([&](const auto&) { + worker->schedule([done, &thread_of_schedule_promise](const auto&) { thread_of_schedule_promise.set_value(get_thread_id_as_string(std::this_thread::get_id())); if constexpr (!std::same_as) thread_local rpp::utils::finally_action s_a{[done] {