pika::threads::thread_state set_thread_state(
const pika::threads::thread_id_type& id,
pika::threads::thread_schedule_state state =
thread_schedule_state::pending,
pika::threads::thread_restart_state stateex =
thread_restart_state::signaled,
pika::threads::thread_priority priority =
thread_priority::normal,
bool retry_on_active = true,
pika::error_code& ec = throws)
pika::threads::thread_state set_thread_state(
const pika::threads::thread_id_type& id,
pika::threads::thread_schedule_state state =
thread_schedule_state::pending,
pika::threads::thread_restart_state stateex =
thread_restart_state::signaled,
pika::threads::thread_priority priority =
thread_priority::normal,
bool retry_on_active = true,
pika::error_code& ec = throws)Description
Set the thread state of the \areferenced by the thread_id \a
////////////////////////////////////////////////////////////////////////
Declared at: libs/pika/threading_base/include/pika/threading_base/thread_helpers.hpp:66
Parameters
- const pika::threads::thread_id_type& id
- [in] The thread id of the thread the state should be modified for.
- pika::threads::thread_schedule_state state = thread_schedule_state::pending
- [in] The new state to be set for the thread referenced by the \aparameter.
- pika::threads::thread_restart_state stateex = thread_restart_state::signaled
- [in] The new extended state to be set for the thread referenced by the \aparameter.
- pika::threads::thread_priority priority = thread_priority::normal
- bool retry_on_active = true
- pika::error_code& ec = throws
- [in,out] this represents the error status on exit, if this is pre-initialized to \athe function will throw on error instead.
Returns
This function returns the previous state of the thread referenced by the \aparameter. It will return one of the values as defined by the\aenumeration. If the thread is not known to the thread-manager the return value will be \a