Ë ¥L iøãó0—ddlZddlZddlZGd„d«Zy)éNcó*—eZdZdZdd„Zd„Zd„Zd„Zy)Ú FileBatonz0A primitive, file-based synchronization utility.Ncó<—||_||_d|_||_y)an 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)Úselfrrr s ú\/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/torch/utils/file_baton.pyÚ__init__zFileBaton.__init__ s#€ð-ˆÔØ(ˆÔ؈ŒØ"4ˆÕócó¬— tj|jtjtjz«|_y#t $rYywxYw)z– 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_acquirezFileBaton.try_acquiresA€ð Ü—g‘g˜d×1Ñ1´2·:±:ÄÇ Á Ñ3IÓJˆDŒGØøÜò Ùð ús‚AAÁ AÁAcóÞ—d}tj«}tjj|j«r®tj |j «|jXtj«|z |jkDr4|s2tjd|j›d|j›d«d}tjj|j«rŒ­yy)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. FNzWaited on lock file "z" for z seconds.T) ÚtimerÚpathÚexistsrÚsleeprr ÚwarningsÚwarn)r Ú has_warnedÚ start_times r ÚwaitzFileBaton.wait's±€ðˆ ä—Y‘Y“[ˆ Üg‰gn‰n˜T×0Ñ0Ô1Ü J‰Jt×(Ñ(Ô )à×&Ñ&Ð2Ü—9‘9“; Ñ+¨d×.EÑ.EÒEÉjÜ—M‘MÐ$9¸$×:MÑ:MÐ9NÈfØ%)×%<Ñ%<Ð$=¸Yð#HôIà!%Jôg‰gn‰n˜T×0Ñ0×1r có˜—|jtj|j«tj|j«y)z'Release the baton and removes its file.N)rrÚcloseÚremoverrs r ÚreleasezFileBaton.release:s.€à 7‰7Ð Ü H‰HT—W‘WÔ ä ‰ $×%Ñ%Õ&r )gš™™™™™¹?N)Ú__name__Ú __module__Ú __qualname__Ú__doc__r rrr#©r r rrs„Ù:ó5ò ò&ó&'r r)rrrrr(r r úr)sðã Û Û÷8'ò8'r