carb::this_thread::spinWait
Defined in carb/thread/Util.h
-
template<class Func>
void carb::this_thread::spinWait(Func &&f) noexcept(noexcept(f())) Calls a predicate repeatedly until it returns
true
.This function is recommended only for situations where exactly one thread is waiting on another thread. For multiple threads waiting on a predicate, use spinWaitWithBackoff().
- Parameters
f – The predicate to call repeatedly until it returns
true
.