lock
This module’s scope covers operations related to mutexes, especially locks.
-
class
tuna.io.lock.
lock
[source]
This class’ responsibility is to provide a lock mechanism to mediate access to resource from competing threads.
It is not meant to be user-serviceable.
-
get
()[source]
This method’s goal is to give the lock to the requestor. If the lock is set, will block the call until the lock is unset, or the timeout elapses.
-
let
()[source]
This method’s goal is to unlocks the lock. Since a timeout may have released this lock before it is properly unlocked, a warning is sent to the log facility, so the user may adjust the relevant code.