Ë
    ¢ëíh  ã                  óÐ   — d dl mZ d dlZd dlmZ d dlmZ d dlmZ ddl	m
Z
mZ dd	lmZ  G d
„ dee   «      Z e«       Z G d„ d«      Ze	 d	 	 	 	 	 dd„«       Zddd„Zdd„Zdd„Zy)é    )ÚannotationsN)Ú	Generator)Úcontextmanager)ÚTracebackTypeé   )Ú	TaskGroupÚ
TaskStatusé   )Úget_async_backendc                  ó   — e Zd Zddd„Zy)Ú_IgnoredTaskStatusNc                 ó   — y ©N© ©ÚselfÚvalues     ú7D:\jyotish\venv\Lib\site-packages\anyio/_core/_tasks.pyÚstartedz_IgnoredTaskStatus.started   s   € Øó    r   )r   ÚobjectÚreturnÚNone)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r      s   „ õr   r   c                  óü   — e Zd ZdZej
                  ddœ	 	 	 	 	 dd„Zddd„Zedd„«       Z	e	j                  dd„«       Z	edd	„«       Zedd
„«       Zedd„«       Zej                  dd„«       Zdd„Z	 	 	 	 	 	 	 	 dd„Zy)ÚCancelScopezñ
    Wraps a unit of work that can be made separately cancellable.

    :param deadline: The time (clock value) when this scope is cancelled automatically
    :param shield: ``True`` to shield the cancel scope from external cancellation
    F©ÚdeadlineÚshieldc               ó8   — t        «       j                  ||¬«      S )N)r!   r    )r   Úcreate_cancel_scope)Úclsr    r!   s      r   Ú__new__zCancelScope.__new__   s   € ô !Ó"×6Ñ6¸fÈxÐ6ÓXÐXr   Nc                ó   — t         ‚)z~
        Cancel this scope immediately.

        :param reason: a message describing the reason for the cancellation

        ©ÚNotImplementedError)r   Úreasons     r   ÚcancelzCancelScope.cancel!   s
   € ô "Ð!r   c                ó   — t         ‚)z“
        The time (clock value) when this scope is cancelled automatically.

        Will be ``float('inf')`` if no timeout has been set.

        r'   ©r   s    r   r    zCancelScope.deadline*   ó
   € ô "Ð!r   c                ó   — t         ‚r   r'   r   s     r   r    zCancelScope.deadline4   ó   € ä!Ð!r   c                ó   — t         ‚)z+``True`` if :meth:`cancel` has been called.r'   r,   s    r   Úcancel_calledzCancelScope.cancel_called8   s
   € ô "Ð!r   c                ó   — t         ‚)a  
        ``True`` if this scope suppressed a cancellation exception it itself raised.

        This is typically used to check if any work was interrupted, or to see if the
        scope was cancelled due to its deadline being reached. The value will, however,
        only be ``True`` if the cancellation was triggered by the scope itself (and not
        an outer scope).

        r'   r,   s    r   Úcancelled_caughtzCancelScope.cancelled_caught=   s
   € ô "Ð!r   c                ó   — t         ‚)z¥
        ``True`` if this scope is shielded from external cancellation.

        While a scope is shielded, it will not receive cancellations from outside.

        r'   r,   s    r   r!   zCancelScope.shieldJ   r-   r   c                ó   — t         ‚r   r'   r   s     r   r!   zCancelScope.shieldT   r/   r   c                ó   — t         ‚r   r'   r,   s    r   Ú	__enter__zCancelScope.__enter__X   s   € Ü!Ð!r   c                ó   — t         ‚r   r'   )r   Úexc_typeÚexc_valÚexc_tbs       r   Ú__exit__zCancelScope.__exit__[   s
   € ô "Ð!r   )r    Úfloatr!   Úboolr   r   r   )r)   z
str | Noner   r   ©r   r=   )r   r=   r   r   )r   r>   )r   r>   r   r   )r   r   )r9   ztype[BaseException] | Noner:   zBaseException | Noner;   zTracebackType | Noner   r>   )r   r   r   Ú__doc__ÚmathÚinfr%   r*   Úpropertyr    Úsetterr1   r3   r!   r7   r<   r   r   r   r   r      sè   „ ñð #'§(¡(¸5ñYØðYØ48ðYà	óYô
"ð ò"ó ð"ð ‡__ò"ó ð"ð ò"ó ð"ð ò
"ó ð
"ð ò"ó ð"ð ‡]]ò"ó ð"ó"ð"à,ð"ð &ð"ð %ð	"ð
 
ô"r   r   c              #  ó"  K  — t        «       j                  }| 
 |«       | z   nt        j                  }t        «       j	                  ||¬«      5 }|–— ddd«       j
                  r |«       |j                  k\  rt        ‚yy# 1 sw Y   Œ1xY w­w)a½  
    Create a context manager which raises a :class:`TimeoutError` if does not finish in
    time.

    :param delay: maximum allowed time (in seconds) before raising the exception, or
        ``None`` to disable the timeout
    :param shield: ``True`` to shield the cancel scope from external cancellation
    :return: a context manager that yields a cancel scope
    :rtype: :class:`~typing.ContextManager`\[:class:`~anyio.CancelScope`\]

    Nr   )r   Úcurrent_timerA   rB   r#   r3   r    ÚTimeoutError)Údelayr!   rF   r    Úcancel_scopes        r   Ú
fail_afterrJ   d   s‰   è ø€ ô %Ó&×3Ñ3€LØ+0Ð+<‘“ Ò&Ä$Ç(Á(€HÜ	Ó	×	0Ñ	0Ø &ð 
1ô 
à	ØÒ÷
ð
 ×$Ò$©«¸<×;PÑ;PÒ)PÜÐð *QÐ$÷
ð 
üs   ‚ABÁBÁ0BÂBÂBc                ó’   — | t        «       j                  «       | z   nt        j                  }t        «       j	                  ||¬«      S )aD  
    Create a cancel scope with a deadline that expires after the given delay.

    :param delay: maximum allowed time (in seconds) before exiting the context block, or
        ``None`` to disable the timeout
    :param shield: ``True`` to shield the cancel scope from external cancellation
    :return: a cancel scope

    r   )r   rF   rA   rB   r#   )rH   r!   r    s      r   Úmove_on_afterrL   ~   sD   € ð 9>Ð8IÔ	Ó	×	)Ñ	)Ó	+¨eÒ	3ÌtÏxÉxð ô Ó×2Ñ2¸HÈVÐ2ÓTÐTr   c                 ó2   — t        «       j                  «       S )a?  
    Return the nearest deadline among all the cancel scopes effective for the current
    task.

    :return: a clock value from the event loop's internal clock (or ``float('inf')`` if
        there is no deadline in effect, or ``float('-inf')`` if the current scope has
        been cancelled)
    :rtype: float

    )r   Úcurrent_effective_deadliner   r   r   rN   rN   Ž   s   € ô Ó×9Ñ9Ó;Ð;r   c                 ó2   — t        «       j                  «       S )z:
    Create a task group.

    :return: a task group

    )r   Úcreate_task_groupr   r   r   rP   rP   œ   s   € ô Ó×0Ñ0Ó2Ð2r   )F)rH   úfloat | Noner!   r>   r   z"Generator[CancelScope, None, None])rH   rQ   r!   r>   r   r   r?   )r   r   )Ú
__future__r   rA   Úcollections.abcr   Ú
contextlibr   Útypesr   Ú
abc._tasksr   r	   Ú
_eventloopr   r   r   ÚTASK_STATUS_IGNOREDr   rJ   rL   rN   rP   r   r   r   Ú<module>rY      s‚   ðÝ "ã Ý %Ý %Ý ç .Ý )ô˜ FÑ+ô ñ
 )Ó*Ð ÷M"ñ M"ð` à(-ðØðØ!%ðà'òó ðô2Uó <ô3r   