just::thread Complete C++ Standard Thread Library by Just Software Solutions

Documentation Home >> Headers >> <thread> Header >> std::this_thread >> std::this_thread::yield Non Member Function

Used to inform the library that the thread which invoked the function does not need to run at the point of the call. Commonly used in tight loops to avoid consuming excessive CPU time.

void yield();

Effects:

Provides the library an opportunity to schedule something else in place of the current thread.

Throws:

Nothing

Header

#include <thread>

See Also