U
    d                     @   sT   d dl Z dgZe jdks"e jdk r8d dlmZ dd Znd dlZdd Zdd Z	dS )	    Nregister_after_forkwin32)      c                    s    fdd}t t| d S )Nc                    s
      d S )N )argfuncr   A/tmp/pip-unpacked-wheel-ua33x9lu/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__platformversion_infoZmultiprocessing.utilutilr   r   r   r   r   r   r   r
   <module>   s   
