def __init__(self, log = None, debug = False):
        """
        Takes two optional parameters, (1) log is an external log function the
        lock would use to send its messages to, ex: lambda s: xprint(s),
        (2) debug is a boolean value, if it's True the lock would be checking
        its internal invariant before and after each call.
        """

        self.__log, self.__debug, self.lckLock = log, debug, Lock()
        self.thrOwner, self.intOwnerDepth, self.dicUsers = None, 0, {}
        self.lstOwners, self.lstUsers, self.lstPooledEvents = [], [], []

        Takes two optional parameters, (1) log is an external log function the
        lock would use to send its messages to, ex: lambda s: xprint(s),
        (2) debug is a boolean value, if it's True the lock would be checking
        its internal invariant before and after each call.
        
recipes/Python/465156_Shared_lock_akreaderwriter_lock_timeouts_FIFO/recipe-465156.py