ó
    "Eñi\  ã                   ó0   • S SK r S SKrS SKr " S S5      rg)é    Nc                   óN   • \ rS rSrSrS
SS jjrS\S-  4S jrSS jrSS jr	S	r
g)Ú	FileBatoné   z0A primitive, file-based synchronization utility.NÚreturnc                 ó6   • Xl         X l        SU l        X0l        g)a.  
Create a new :class:`FileBaton`.

Args:
    lock_file_path: The path to the file used for locking.
    wait_seconds: The seconds to periodically sleep (spin) when
        calling ``wait()``.
    warn_after_seconds: The seconds to wait before showing
        lock file path to warn existing lock file.
N)Úlock_file_pathÚwait_secondsÚfdÚwarn_after_seconds)Úselfr   r	   r   s       ÚS/home/mande/repo/quber/.venv/lib/python3.13/site-packages/torch/utils/file_baton.pyÚ__init__ÚFileBaton.__init__
   s   € ð -ÔØ(ÔØˆŒØ"4Õó    c                 ó°   •  [         R                  " U R                  [         R                  [         R                  -  5      U l        g! [         a     gf = f)zv
Try to atomically create a file under exclusive access.

Returns:
    True if the file could be created, else False.
TF)ÚosÚopenr   ÚO_CREATÚO_EXCLr
   ÚFileExistsError©r   s    r   Útry_acquireÚFileBaton.try_acquire   sA   € ð	ä—g’g˜d×1Ñ1´2·:±:ÄÇ	Á	Ñ3IÓJˆDŒGØøÜó 	Ùð	ús   ‚AA Á
AÁAc                 ó  • Sn[         R                   " 5       n[        R                  R                  U R                  5      (       a½  [         R
                  " U R                  5        U R                  b_  [         R                   " 5       U-
  U R                  :”  a9  U(       d2  [        R                  " SU R                   SU R                   S3SS9  Sn[        R                  R                  U R                  5      (       a  M¼  gg)	z¦
Periodically sleeps for a certain amount until the baton is released.

The amount of time slept depends on the ``wait_seconds`` parameter
passed to the constructor.
FNzWaited on lock file "z" for z	 seconds.é   )Ú
stacklevelT)
Útimer   ÚpathÚexistsr   Úsleepr	   r   ÚwarningsÚwarn)r   Ú
has_warnedÚ
start_times      r   ÚwaitÚFileBaton.wait(   sº   € ð ˆ
ä—Y’Y“[ˆ
Ü�g‰g�n‰n˜T×0Ñ0×1Ñ1Ü�JŠJ�t×(Ñ(Ô)à×&Ñ&Ñ2Ü—9’9“; Ñ+¨d×.EÑ.EÓEÎjÜ—M’MÐ$9¸$×:MÑ:MÐ9NÈfØ%)×%<Ñ%<Ð$=¸Yð#HØTUòWà!%�Jô �g‰g�n‰n˜T×0Ñ0×1Õ1r   c                 óž   • U R                   b   [        R                  " U R                   5        [        R                  " U R                  5        g)z'Release the baton and removes its file.N)r
   r   ÚcloseÚremover   r   s    r   ÚreleaseÚFileBaton.release;   s.   € à�7‰7ÑÜ�HŠH�T—W‘WÔä
�	Š	�$×%Ñ%Õ&r   )r
   r   r	   r   )gš™™™™™¹?N)r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Úboolr   r%   r*   Ú__static_attributes__© r   r   r   r      s$   † Ù:ö5ð ˜T D™[ô ô&÷&'r   r   )r   r   r!   r   r3   r   r   Ú<module>r4      s   ðã 	Û Û ÷9'ò 9'r   