U
    9%e                     @   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   \/var/www/html/Darija-Ai-API/env/lib/python3.8/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   

