U
    nËj  ã                   @  sR   d dl mZ d dlmZmZ d dlmZ d dlmZ edƒZ	G dd„ ded�Z
d	S )
é    )Úannotations)ÚABCMetaÚabstractmethod)ÚTracebackType)ÚTypeVarÚTc                   @  sJ   e Zd ZdZdZdddœdd„Zddd	d
dœdd„Zed
dœdd„ƒZdS )ÚAsyncResourcezÇ
    Abstract base class for all closeable asynchronous resources.

    Works as an asynchronous context manager which returns the instance itself on enter,
    and calls :meth:`aclose` on exit.
    © r   )ÚselfÚreturnc                 Ã  s   | S ©Nr	   ©r
   r	   r	   ú8/tmp/pip-unpacked-wheel-k8mofgf9/anyio/abc/_resources.pyÚ
__aenter__   s    zAsyncResource.__aenter__ztype[BaseException] | NonezBaseException | NonezTracebackType | NoneÚNone)Úexc_typeÚexc_valÚexc_tbr   c                 Ã  s   |   ¡ I d H  d S r   )Úaclose)r
   r   r   r   r	   r	   r   Ú	__aexit__   s    zAsyncResource.__aexit__)r   c                 Ã  s   dS )zClose the resource.Nr	   r   r	   r	   r   r      s    zAsyncResource.acloseN)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r   r   r   r	   r	   r	   r   r   
   s   r   )Ú	metaclassN)Ú
__future__r   Úabcr   r   Útypesr   Útypingr   r   r   r	   r	   r	   r   Ú<module>   s
   