bool enumerate_threads(
    const util::function<bool(thread_id_type)>& f,
    pika::threads::thread_schedule_state state =
        thread_schedule_state::unknown)

Description

The function \awill invoke the given function \afor each thread with a matching thread state.

Declared at: libs/pika/runtime/include/pika/runtime/thread_pool_helpers.hpp:103

Parameters

const util::function<bool(thread_id_type)>& f
[in] The function which should be called for each matching thread. Returning 'false' from this function will stop the enumeration process.
pika::threads::thread_schedule_state state = thread_schedule_state::unknown
[in] This specifies the thread-state for which the threads should be enumerated.