OpenQuizz
Une application de gestion des contenus pédagogiques
BlockingLockFile Class Reference
Inheritance diagram for BlockingLockFile:
Collaboration diagram for BlockingLockFile:

Public Member Functions

def __init__ (self, file_path, check_interval_s=0.3, max_block_time_s=maxsize)
 
- Public Member Functions inherited from LockFile
def __init__ (self, file_path)
 
def __del__ (self)
 

Detailed Description

The lock file will block until a lock could be obtained, or fail after
a specified timeout.

:note: If the directory containing the lock was removed, an exception will
    be raised during the blocking period, preventing hangs as the lock
    can never be obtained.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  file_path,
  check_interval_s = 0.3,
  max_block_time_s = maxsize 
)
Configure the instance

:param check_interval_s:
    Period of time to sleep until the lock is checked the next time.
    By default, it waits a nearly unlimited time

:param max_block_time_s: Maximum amount of seconds we may lock

The documentation for this class was generated from the following file: