Overview:
- The RLock implements the re-entrant lock in Python. Using RLock a recursive function can acquire the same lock multiple times. If a thread uses the Lock object to acquire() it more than once in a recursive code this will result in a deadlock.
- RLock has its acquire() and release() methods. The acquire() can acquire the lock more than once by the owning thread. While using RLock, the owning thread has to release the RLock object the same number of times as the acquire() was called.