o
    ¡…›i„  ã                   @   s<   d dl mZ d dlmZmZ edƒZG dd„ dee ƒZdS )é    )ÚCallable)ÚGenericÚTypeVarÚRc                   @   sb   e Zd ZU dZeg ef dB ed< edB ed< ddgZdeg ef ddfdd„Zdefdd	„Z	dS )
ÚThunkz¥
    A simple lazy evaluation implementation that lets you delay
    execution of a function.  It properly handles releasing the
    function once it is forced.
    NÚfÚrÚreturnc                 C   s   || _ d | _d S ©N©r   r   )Úselfr   © r   úT/sda-disk/www/egybert/egybert_env/lib/python3.10/site-packages/torch/utils/_thunk.pyÚ__init__   s   
zThunk.__init__c                 C   s&   | j d u r| jS |   ¡ | _d | _ | jS r
   r   )r   r   r   r   Úforce   s
   

zThunk.force)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Ú__annotations__Ú	__slots__r   r   r   r   r   r   r      s   
 r   N)Úcollections.abcr   Útypingr   r   r   r   r   r   r   r   Ú<module>   s    