o
    wZh  ă                   @   sJ   d dl Z dgZe jdkrd dlmZ dd Znd dlZdd Zdd ZdS )é    NÚregister_after_forkÚwin32c                    s    fdd}t  t|Ą d S )Nc                    s
      d S )NŠ )ÚargŠÚfuncr   úL/var/www/auris/lib/python3.10/site-packages/torch/multiprocessing/_atfork.pyÚwrapper   s   
z_register.<locals>.wrapper)Ú_utilr   Ú	_register)r   r	   r   r   r   r   
   s   r   c                 C   s   t j| d d S )N)Úafter_in_child)ÚosÚregister_at_forkr   r   r   r   r      s   c                 C   s   t |  dS )ah  Register a callable to be executed in the child process after a fork.

    Note:
        In python < 3.7 this will only work with processes created using the
        ``multiprocessing`` module. In python >= 3.7 it also works with
        ``os.fork()``.

    Args:
        func (function): Function taking no arguments to be called in the child after fork

    N)r   r   r   r   r   r      s   )	ÚsysÚ__all__ÚplatformZmultiprocessing.utilÚutilr
   r   r   r   r   r   r   r   Ú<module>   s   

