+
    õäûj  ã                  óÂ   € R t ^ RIHt . ROt^ RIt^ RIt^ RIHt ^ RIH	t	 ^ RI
Ht ]P                  R8X  d
   ^ RIHtHt M^ RIHtHt RR	R
R/R R lltR R ltRR.tR# )znA minimal native lock over a caller-owned file descriptor, contending with :class:`FileLock` on the same file.)ÚannotationsN)ÚTIMEOUT_MAX)ÚFinal)Ú_secondsÚwin32)Ú_lock_fd_nonblockingÚ
_unlock_fdÚblockingTÚpoll_intervalgš™™™™™©?c               ó(   € V ^8„  d   QhRRRRRRRR/# )é   ÚfdÚintr	   Úboolr
   ÚfloatÚreturn© )Úformats   "ÚPC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\filelock\_descriptor.pyÚ__annotate__r      s)   € ÷ 'ñ '˜ð '¨$ð 'Àeð 'ÐW[ñ 'ó    c               óî   € V'       g   \        V 4      # ^ \        RV4      ;pu;8  d   \        8:  g   M R\         RV 2p\        V4      h\        V 4      '       g   \        P
                  ! V4       K)  R# )a8  
Take the native OS lock on *fd*, a file descriptor the caller opened and owns.

This is the same exclusive lock the native :class:`FileLock` backend uses: a whole-file :func:`fcntl.flock` lock
on Unix, or a ``LockFileEx`` lock of one byte at offset 0 on Windows. A descriptor lock and a native path lock on
the same file contend with each other. There are no offset or length parameters; seeking *fd* does not change
the locked range. Interoperating with another tool requires agreement on the locking primitive, range, and protocol.

Unlike :class:`FileLock` it adds no path handling: it never opens, truncates, closes, unlinks, chmods,
canonicalizes, or falls back. The caller owns *fd* before, during, and after the call, and must close it.
On Windows *fd* must be a synchronous descriptor (its handle not opened with ``FILE_FLAG_OVERLAPPED``).

For timeout, reentrancy, singleton, lifetime, or stale-break behavior, use :class:`FileLock`. There is no async
wrapper. Run this in an executor, or drive ``blocking=False`` from your own polling loop.

:param fd: an open file descriptor the caller owns.
:param blocking: when ``True`` (default), retry the nonblocking attempt every *poll_interval* seconds until it
    succeeds; when ``False``, make one attempt.
:param poll_interval: positive seconds between attempts while blocking, at most :data:`threading.TIMEOUT_MAX`;
    ignored when *blocking* is ``False``.

:returns: ``True`` once the lock is held, or ``False`` on contention when ``blocking`` is ``False``.

:raises OSError: for a permanent native failure, such as an invalid descriptor, or with ``errno.ENOSYS`` when the
    Python build lacks the native locking primitive. The descriptor is left open.
:raises ValueError: if a blocking call receives a *poll_interval* outside that range, including ``nan``.

.. versionadded:: 3.30.0

r
   z1poll_interval must be greater than 0 and at most z, got T)r   r   r   Ú
ValueErrorÚtimeÚsleep)r   r	   r
   Úmsgs   &$$ r   Úlock_descriptorr      sd   € ÷> Ü# BÓ'Ð'à¤¨/¸=Ó!IÐI�ÖYÌkÖYØMÌkÈ]ÐZ`ÐanÐ`oÐpˆÜ˜‹oÐÜ" 2×&Ò&Ü�
Š
�=Ö!Ùr   c               ó    € V ^8„  d   QhRRRR/# )r   r   r   r   ÚNoner   )r   s   "r   r   r   >   s   € ÷ ñ ˜#ð  $ñ r   c                ó   € \        V 4       R# )a€  
Release the native OS lock on *fd* without touching the descriptor.

:param fd: the descriptor a prior :func:`lock_descriptor` locked; the caller still owns and must close it.

:raises OSError: if the native unlock fails, including ``errno.ENOSYS`` when the Python build lacks the native
    locking primitive; the caller may retry on the same descriptor.

.. versionadded:: 3.30.0

N)r   )r   s   &r   Úunlock_descriptorr    >   s   € ô ˆr†Nr   r   r    )zfilelock._unixÚ	threadingÚtyping)Ú__doc__Ú
__future__r   Ú__lazy_modules__Úsysr   r!   r   r"   r   Úfilelock._apir   ÚplatformÚfilelock._windowsr   r   Úfilelock._unixr   r    Ú__all__r   r   r   Ú<module>r,      s]   ðÙ tå "â<Ð ã 
Û Ý !Ý å "à‡<�<�7ÔßBÐBç?ð'°ð 'Èd÷ 'õTð  Øð‚r   