/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/utils/__pycache__
� �f�k�� �0 � d Z ddlZddlZddlmZ dZd� ZdS )a High-level support for working with threads in asyncio Modified from Python 3.10 stdlib https://github.com/python/cpython/blob/b11a951f16f0603d98de24fee5c023df83ea552c/Lib/asyncio/threads.py (the license GPL-compatible but doesn't require to open-source either). � N)�events)� to_threadc � � K � t j � � }t j � � }t j |j | g|�R i |��}|� d|� � � d{V ��S )a� Asynchronously run function *func* in a separate thread. Any *args and **kwargs supplied for this function are directly passed to *func*. Also, the current :class:`contextvars.Context` is propogated, allowing context variables from the main thread to be accessed in the separate thread. Return a coroutine that can be awaited to get the eventual result of *func* N)r �get_running_loop�contextvars�copy_context� functools�partial�run�run_in_executor)�func�args�kwargs�loop�ctx� func_calls �R/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/utils/threads.pyr r sp � � � � �"�$�$�D� � "� $� $�C��!�#�'�4�A�$�A�A�A�&�A�A�I��%�%�d�I�6�6�6�6�6�6�6�6�6� )�__doc__r r �asyncior �__all__r � r r �<module>r s[ ��� � � � � � � � � � � � � � � � ��7� 7� 7� 7� 7r
.
Edit
..
Edit
__init__.cpython-311.opt-1.pyc
Edit
__init__.cpython-311.pyc
Edit
_shutil.cpython-311.opt-1.pyc
Edit
_shutil.cpython-311.pyc
Edit
antivirus_mode.cpython-311.opt-1.pyc
Edit
antivirus_mode.cpython-311.pyc
Edit
async_utils.cpython-311.opt-1.pyc
Edit
async_utils.cpython-311.pyc
Edit
benchmark.cpython-311.opt-1.pyc
Edit
benchmark.cpython-311.pyc
Edit
buffer.cpython-311.opt-1.pyc
Edit
buffer.cpython-311.pyc
Edit
check_db.cpython-311.opt-1.pyc
Edit
check_db.cpython-311.pyc
Edit
check_lock.cpython-311.opt-1.pyc
Edit
check_lock.cpython-311.pyc
Edit
cli.cpython-311.opt-1.pyc
Edit
cli.cpython-311.pyc
Edit
common.cpython-311.opt-1.pyc
Edit
common.cpython-311.pyc
Edit
completions.cpython-311.opt-1.pyc
Edit
completions.cpython-311.pyc
Edit
config.cpython-311.opt-1.pyc
Edit
config.cpython-311.pyc
Edit
cronjob.cpython-311.opt-1.pyc
Edit
cronjob.cpython-311.pyc
Edit
doctor.cpython-311.opt-1.pyc
Edit
doctor.cpython-311.pyc
Edit
fd_ops.cpython-311.opt-1.pyc
Edit
fd_ops.cpython-311.pyc
Edit
hyperscan.cpython-311.opt-1.pyc
Edit
hyperscan.cpython-311.pyc
Edit
importer.cpython-311.opt-1.pyc
Edit
importer.cpython-311.pyc
Edit
ipecho.cpython-311.opt-1.pyc
Edit
ipecho.cpython-311.pyc
Edit
json.cpython-311.opt-1.pyc
Edit
json.cpython-311.pyc
Edit
kwconfig.cpython-311.opt-1.pyc
Edit
kwconfig.cpython-311.pyc
Edit
net_transport.cpython-311.opt-1.pyc
Edit
net_transport.cpython-311.pyc
Edit
parsers.cpython-311.opt-1.pyc
Edit
parsers.cpython-311.pyc
Edit
resource_limits.cpython-311.opt-1.pyc
Edit
resource_limits.cpython-311.pyc
Edit
safe_fileops.cpython-311.opt-1.pyc
Edit
safe_fileops.cpython-311.pyc
Edit
safe_sequence.cpython-311.opt-1.pyc
Edit
safe_sequence.cpython-311.pyc
Edit
serialization.cpython-311.opt-1.pyc
Edit
serialization.cpython-311.pyc
Edit
sshutil.cpython-311.opt-1.pyc
Edit
sshutil.cpython-311.pyc
Edit
subprocess.cpython-311.opt-1.pyc
Edit
subprocess.cpython-311.pyc
Edit
support.cpython-311.opt-1.pyc
Edit
support.cpython-311.pyc
Edit
threads.cpython-311.opt-1.pyc
Edit
threads.cpython-311.pyc
Edit
validate.cpython-311.opt-1.pyc
Edit
validate.cpython-311.pyc
Edit
whmcs.cpython-311.opt-1.pyc
Edit
whmcs.cpython-311.pyc
Edit
wordpress_mu_plugin.cpython-311.opt-1.pyc
Edit
wordpress_mu_plugin.cpython-311.pyc
Edit