Viewing File: /opt/alt/python35/lib/python3.5/site-packages/daemon/__pycache__/pidfile.cpython-35.opt-1.pyc
^¬V[ ã @ sI d Z d d l m Z m Z d d l m Z Gd d „ d e e ƒ Z d S)z8 Lockfile behaviour implemented via Unix PID files.
é )Úabsolute_importÚunicode_literals)ÚPIDLockFilec s@ e Z d Z d Z d ‡ f d d † Z d ‡ f d d † Z ‡ S)ÚTimeoutPIDLockFilea@ Lockfile with default timeout, implemented as a Unix PID file.
This uses the ``PIDLockFile`` implementation, with the
following changes:
* The `acquire_timeout` parameter to the initialiser will be
used as the default `timeout` parameter for the `acquire`
method.
Nc s) | | _ t t | ƒ j | | | Ž d S)zû Set up the parameters of a TimeoutPIDLockFile.
:param path: Filesystem path to the PID file.
:param acquire_timeout: Value to use by default for the
`acquire` call.
:return: ``None``.
N)Úacquire_timeoutÚsuperr Ú__init__)ÚselfÚpathr ÚargsÚkwargs)Ú __class__© ú/pidfile.pyr ! s zTimeoutPIDLockFile.__init__c s5 | d k r | j } t t | ƒ j | | | Ž d S)ax Acquire the lock.
:param timeout: Specifies the timeout; see below for valid
values.
:return: ``None``.
The `timeout` defaults to the value set during
initialisation with the `acquire_timeout` parameter. It is
passed to `PIDLockFile.acquire`; see that method for
details.
N)r r r Úacquire)r Útimeoutr r )r
r r r - s
zTimeoutPIDLockFile.acquire)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r r r r )r
r r s
r N)r Z
__future__r r Zlockfile.pidlockfiler Úobjectr r r r r Ú<module> s
Back to Directory
File Manager