%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.9/site-packages/ansible/module_utils/facts/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.9/site-packages/ansible/module_utils/facts/__pycache__/timeout.cpython-39.pyc

a

�)g�	�@sRddlmZmZmZeZddlZddlmZ	dZ
dZGdd�de�Z
d	dd�ZdS)
�)�absolute_import�division�print_functionN�
c@seZdZdS)�TimeoutErrorN)�__name__�
__module__�__qualname__�r
r
�F/usr/lib/python3.9/site-packages/ansible/module_utils/facts/timeout.pyrsr�
Timer expiredcs(�fdd�}t��r$�}d�||�S|S)z�
    Timeout decorator to expire after a set number of seconds.  This raises an
    ansible.module_utils.facts.TimeoutError if the timeout is hit before the
    function completes.
    cs��fdd�}|S)Ncs��}|durt��d�pt}tjdd�}|��||�}|��zDz|�|�WW|��Stj	yvt	d|��Yn0W|��n
|��0dS)N�GATHER_TIMEOUT�)Z	processeszTimer expired after %s seconds)
�globals�get�DEFAULT_GATHER_TIMEOUT�mpZ
ThreadPoolZapply_async�closeZ	terminate�multiprocessingr)�args�kwargsZ
timeout_value�pool�res)�func�secondsr
r�wrapper(s�z+timeout.<locals>.decorator.<locals>.wrapperr
)rr�r)rr�	decorator'sztimeout.<locals>.decoratorN)�callable)rZ
error_messagerrr
rr�timeout!sr)Nr)Z
__future__rrr�typeZ
__metaclass__rZmultiprocessing.poolrrr
r�	Exceptionrrr
r
r
r�<module>s

Zerion Mini Shell 1.0