Skip to content

MTY_CondWait

chrisd1100 edited this page Aug 25, 2022 · 1 revision

Wait for a condition variable to be signaled with a timeout.

bool MTY_CondWait(
    MTY_Cond *  ctx,
    MTY_Mutex * mutex,
    int32_t     timeout
);

Parameters

ctx (MTY_Cond *)

An MTY_Cond condition variable.

mutex (MTY_Mutex *)

An MTY_Mutex that should be locked before the call to this function. When this function is called, the mutex will be unlocked while it is waiting, then the lock will be reacquired after this function returns.

timeout (int32_t)

Time to wait in milliseconds for the condition variable to be signaled. A negative value will not timeout.

Return value

bool

If signaled, returns true, otherwise false on timeout.

Platform support

Windows   macOS   Android   Linux  

See also

Module: Thread

Clone this wiki locally