Home »
Python »
Python Reference
Python Lock Class Methods
Python Lock Class has the following built-in functions.
| S.No. |
Method |
Description |
| 1 |
acquire() |
It is used to acquire a lock, either blocking or non-blocking. |
| 2 |
locked() |
Returns True if the lock is acquired by a thread else returns False. |
| 3 |
release() |
Releases the lock which was earlier acquired by a thread. |
Advertisement
Advertisement