ó
    <Ð¦iÏ  ã                   óh   • S SK rS SKJr  SSKJr  S r " S S\R                  R                  5      rg)é    Né   )ÚSimpleQueuec                  ól   • SS K n[        R                  R                  " U 0 UD6  UR	                  5         g )Nr   )ÚgcÚmultiprocessingÚpoolÚworkerÚcollect)ÚargsÚkwargsr   s      ÚY/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/torch/multiprocessing/pool.pyÚclean_workerr      s)   € Ûä×Ñ×Ò Ð0¨Ò0ð ‡JJ…Ló    c                   ó$   • \ rS rSrSrS rS rSrg)ÚPoolé   z¤Pool implementation which uses our version of SimpleQueue.

This lets us pass tensors in shared memory across processes instead of
serializing the underlying data.
c                 óÔ   • [        5       U l        [        5       U l        U R                  R                  R                  U l        U R                  R                  R                  U l        g )N)	r   Ú_inqueueÚ	_outqueueÚ_writerÚsendÚ
_quick_putÚ_readerÚrecvÚ
_quick_get)Úselfs    r   Ú_setup_queuesÚPool._setup_queues   sB   € Ü#›ˆŒÜ$›ˆŒØŸ-™-×/Ñ/×4Ñ4ˆŒØŸ.™.×0Ñ0×5Ñ5ˆr   c                 ó  • [        U R                  [        U R                  5      -
  5       HÙ  nU R                  U R
                  U R                  U R                  U R                  4n[        U S5      (       a  X R                  4-  nU R                  [        US9nU R                  R                  U5        UR                  R                  SS5      Ul        SUl        UR#                  5         [$        R&                  " S5        MÛ     g)z°Increase the number of pool processes to the specified number.

Bring the number of pool processes up to the specified number, for use after
reaping workers which have exited.
Ú_wrap_exception)Útargetr   ÚProcessÚ
PoolWorkerTzadded workerN)ÚrangeÚ
_processesÚlenÚ_poolr   r   Ú_initializerÚ	_initargsÚ_maxtasksperchildÚhasattrr    r"   r   ÚappendÚnameÚreplaceÚdaemonÚstartÚutilÚdebug)r   Ú_r   Úws       r   Ú_repopulate_poolÚPool._repopulate_pool   sË   € ô t—‘¬¨T¯Z©Z«Ñ8Ö9ˆAð —‘Ø—‘Ø×!Ñ!Ø—‘Ø×&Ñ&ðˆDô tÐ.×/Ñ/Ø×-Ñ-Ð/Ñ/Ø—‘¤L°tÐ<ˆAØJ‰J×Ñ˜aÔ Ø—V‘V—^‘^ I¨|Ó<ˆAŒFØˆAŒHØG‰GŒIÜJŠJ~Ö&ò! :r   )r   r   r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r5   Ú__static_attributes__© r   r   r   r      s   † ñò6õ'r   r   )	Úmultiprocessing.poolr   Úmultiprocessing.utilr1   Úqueuer   r   r   r   r=   r   r   Ú<module>rA      s+   ðÛ Ý #å òô#'ˆ?×Ñ×$Ñ$õ #'r   