← back to Atmos Game

assets/gen/.venv/lib/python3.12/site-packages/anyio/_core/__pycache__/_testing.cpython-312.pyc

45 lines

�

c�bj$	��h�ddlmZddlmZmZddlmZmZddlm	Z	Gd�d�Z
dd�Zd
d	�Zdd
�Z
y)�)�annotations)�	Awaitable�	Generator)�Any�cast�)�get_async_backendc�L�eZdZdZdZ								d	d�Zd
d�Zdd�Zdd�Zd
d�Z	y)�TaskInfoaI
    Represents an asynchronous task.

    :ivar int id: the unique identifier of the task
    :ivar parent_id: the identifier of the parent task, if any
    :vartype parent_id: Optional[int]
    :ivar str name: the description of the task (if any)
    :ivar ~collections.abc.Coroutine coro: the coroutine object of the task
    )�_name�id�	parent_id�name�coroc��t}|j�d|j��|_||_||_||_||_y)N�.)�get_current_task�
__module__�__qualname__rr
rrr)�selfr
rrr�funcs      �k/Users/macstudio3/Projects/atmos-game/assets/gen/.venv/lib/python3.12/site-packages/anyio/_core/_testing.py�__init__zTaskInfo.__init__sC�� �����(��$�*;�*;�)<�=��
����%.��� $��	�?C��	�c�`�t|t�r|j|jk(StS�N)�
isinstancerr
�NotImplemented)r�others  r�__eq__zTaskInfo.__eq__$s%���e�X�&��7�7�e�h�h�&�&��rc�,�t|j�Sr)�hashr
�rs r�__hash__zTaskInfo.__hash__*s���D�G�G�}�rc�h�|jj�d|j�d|j�d�S)Nz(id=z, name=�))�	__class__�__name__r
rr#s r�__repr__zTaskInfo.__repr__-s.���.�.�)�)�*�$�t�w�w�k�����
�Q�O�Orc��y)z_
        Return ``True`` if the task has a cancellation pending, ``False`` otherwise.

        F�r#s r�has_pending_cancellationz!TaskInfo.has_pending_cancellation0s��
rN)r
�intrz
int | Nonerz
str | Nonerz)Generator[Any, Any, Any] | Awaitable[Any])r�object�return�bool)r/r-)r/�str)r/r0)
r(rr�__doc__�	__slots__rr r$r)r,r+rrrr	sS���;�I�D��D��D��	D�
8�D���P�rrc�2�t�j�S)z�
    Return the current task.

    :return: a representation of the current task
    :raises NoEventLoopError: if no supported asynchronous event loop is running in the
        current thread

    )r	rr+rrrr8s����/�/�1�1rc�F�tdt�j��S)z�
    Return a list of running tasks in the current event loop.

    :return: a list of task info objects
    :raises NoEventLoopError: if no supported asynchronous event loop is running in the
        current thread

    �list[TaskInfo])rr	�get_running_tasksr+rrr7r7Ds��� �"3�"5�"G�"G�"I�J�Jrc��PK�t�j��d{���y7��w)z5Wait until all other tasks are waiting for something.N)r	�wait_all_tasks_blockedr+rrr9r9Ps����
�
�
4�
4�
6�6�6�s�&�$�&N)r/r)r/r6)r/�None)�
__future__r�collections.abcrr�typingrr�
_eventloopr	rrr7r9r+rr�<module>r?s,��"�0��)�,�,�^	2�	K�7r