File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/cherrypy/lib/__pycache__/locking.cpython-310.pyc
Back
o ;j� � @ sL d dl Z G dd� de�ZG dd� de�ZG dd� de�ZG dd � d e�ZdS ) � Nc @ s e Zd Zdd� ZdS )�NeverExpiresc C s dS )NF� ��selfr r �H/opt/saltstack/salt/lib/python3.10/site-packages/cherrypy/lib/locking.py�expired s zNeverExpires.expiredN)�__name__� __module__�__qualname__r r r r r r s r c @ s, e Zd ZdZdd� Zedd� �Zdd� ZdS ) �TimerzEA simple timer that will indicate when an expiration time has passed.c C s || _ dS )z:Create a timer that expires at `expiration` (UTC datetime)N)� expiration)r r r r r �__init__ s zTimer.__init__c C s | t j �t jj�| �S )z7Return a timer that will expire after `elapsed` passes.)�datetime�now�timezone�utc)�cls�elapsedr r r �after s �zTimer.afterc C s t j �t jj�| jkS �N)r r r r r r r r r r s ��z Timer.expiredN)r r r �__doc__r �classmethodr r r r r r r s r c @ s e Zd ZdZdS )�LockTimeoutzFAn exception when a lock could not be acquired before a timeout periodN)r r r r r r r r r s r c @ s e Zd ZdZdd� Zdd� ZdS )�LockCheckerz;Keep track of the time and detect if a timeout has expired.c C s&