9 std::unique_lock<std::mutex> lock(mutex);
15 std::chrono::microseconds duration(us);
16 std::unique_lock<std::mutex> lock(mutex);
17 return condition.wait_for(lock, duration) == std::cv_status::timeout;
22 condition.notify_one();
27 condition.notify_all();
void signal()
Wake on thread that's waiting on this condtition variable.
void signalAll()
Wake all threads that are waiting on this condition variable.
Thanks to enen for testing this on a real cartridge:
void wait()
Block till another thread signals this condition variable.
bool waitTimeout(unsigned us)
Same as wait(), but with a timeout.