-
Notifications
You must be signed in to change notification settings - Fork 56
MTY_WaitableWait
chrisd1100 edited this page Aug 25, 2022
·
1 revision
Wait for a waitable object to be signaled with a timeout.
If MTY_WaitableSignal
is called on the waitable object, this function will return true
for the next thread that calls this function, even if the signal happens while the waitable object is not actively waiting. If multiple threads are waiting on the waitable object, exactly one thread will become unblocked and return true
, the others will continue waiting.
bool MTY_WaitableWait(
MTY_Waitable * ctx,
int32_t timeout
);
ctx
(MTY_Waitable *
)
An MTY_Waitable
object.
timeout
(int32_t
)
Time to wait in milliseconds for the waitable object to be signaled. A negative value will not timeout.
bool
If signaled, returns true
, otherwise false
on timeout.