class documentation
Mechanism that automatically locks given RemoteLock instance.
Will try to lock again after the RemoteLock is lost of any reason (i.e. connection lost,
kicked by user with higher priority).
| Method | __init__ |
Create a new AutoLock instance. |
| Async Method | lock |
Start automatic locking. |
| Async Method | on |
Schedule lock task because the locking user changed. |
| Async Method | on |
Schedule lock renew task because we don't want to lose the lock. |
| Async Method | unlock |
Stop automatic locking and release the lock if we hold it. |
| Instance Variable | logger |
Undocumented |
| Property | is |
Return whether the auto lock is active or not. |
| Async Method | _lock |
Undocumented |
| Async Method | _renew |
Undocumented |
| Method | _schedule |
Undocumented |
| Instance Variable | _active |
Undocumented |
| Instance Variable | _break |
Undocumented |
| Instance Variable | _interval |
Undocumented |
| Instance Variable | _lock |
Undocumented |
| Instance Variable | _lock |
Undocumented |
| Instance Variable | _renew |
Undocumented |
Create a new AutoLock instance.
| Parameters | |
lock:RemoteLock | The RemoteLock instance to automatically lock. |
breakbool | Whether to use RemoteLock.break_lock() instead of RemoteLock.init_lock(). |
interval:float | How many seconds between two consecutive lock attempts. |