hpx::this_thread::yield

Contents

hpx::this_thread::yield#

Defined in header hpx/thread.hpp.

See Public API for a list of names and headers that are part of the public HPX API.

See also:

void hpx::this_thread::yield() noexcept#

Provides a hint to the implementation to reschedule the execution of threads, allowing other threads to run.

Note

The exact behavior of this function depends on the implementation, in particular on the mechanics of the OS scheduler in use and the state of the system. For example, a first-in-first-out realtime scheduler (SCHED_FIFO in Linux) would suspend the current thread and put it on the back of the queue of the same-priority threads that are ready to run (and if there are no other threads at the same priority, yield has no effect).