-
Notifications
You must be signed in to change notification settings - Fork 144
Mutex
SinisterRectus edited this page Nov 16, 2019
·
7 revisions
Mutual exclusion class used to control Lua coroutine execution order.
Parameter | Type | Optional |
---|---|---|
prepend | boolean | ✔ |
If the mutex is not active (if a coroutine is not queued), this will activate the mutex; otherwise, this will yield and queue the current coroutine.
This method only operates on data in memory.
Returns: nil
If the mutex is active (if a coroutine is queued), this will dequeue and resume the next available coroutine; otherwise, this will deactivate the mutex.
This method only operates on data in memory.
Returns: nil
Parameter | Type |
---|---|
delay | number |
Asynchronously unlocks the mutex after a specified time in milliseconds. The relevant uv_timer
object is returned.
This method only operates on data in memory.
Returns: uv_timer