-
Notifications
You must be signed in to change notification settings - Fork 144
Mutex
SinisterRectus edited this page Nov 8, 2016
·
7 revisions
Properties Inherited From Deque
Name | Type | Mutable | Description |
---|---|---|---|
count | number | How many objects are in the deque |
Name | Type | Mutable | Description |
---|---|---|---|
active | boolean | Indicates whether the mutex is in use. |
Methods Inherited From Deque
Prototype | Description |
---|---|
iter() | Returns an iterator for the objects in the deque, from left to right. |
peekLeft() | Returns the object at the left side of the deque, but does not pop it. |
peekRight() | Returns the object at the right side of the deque, but does not pop it. |
popLeft() | Pop an object from the left side of the deque and return it. |
popRight() | Pop and object from the right side of the deque and return it. |
pushLeft(obj) | Push an object to the left side of the deque. |
pushRight(obj) | Push an object to the right side of the deque. |
Prototype | Description |
---|---|
lock([isRetry]) | Activates the mutex if not already active, or, enqueues and yields the current coroutine. |
unlock() | Dequeues and resumes a coroutine if one exists, or, deactives the mutex. |
unlockAfter(delay) | Unlocks the mutex after x miliseconds. |