Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
ThreadLock.acquire
Requests a thread lock (acquire lock).
acquire()
acquire(timeout)Returns
| Type | Description |
bool | Returns |
Arguments
| Name | Type | Required | Description |
timeout | number | No | Timeout for acquiring the lock, in milliseconds. If omitted, or less than or equal to 0, it waits until the lock is acquired. |
See Also
Remarks
The acquire() function is used to request a thread lock. When a thread calls the acquire() function of a thread lock object, it attempts to acquire the lock. If the lock is not currently held by another thread, the calling thread will successfully acquire the lock and continue execution. If the lock is already held by another thread, the thread calling acquire() will be blocked until the lock is released.