U
    ªº|eâ  ã                   @   sT   d dl Z d dlmZ d dlmZ G dd„ deƒZG dd„ deƒZG dd	„ d	eƒZdS )
é    N)Úassert_spawning)ÚBaseProcessc                       s>   e Zd ZdZddddi dddf‡ fdd„	Zedd„ ƒZ‡  ZS )	ÚLokyProcessÚlokyN© Fc	           	         s<   t ƒ j||||||d� |d kr$i n|| _| j| _|| _d S )N)ÚgroupÚtargetÚnameÚargsÚkwargsÚdaemon)ÚsuperÚ__init__ÚenvÚauthkeyÚinit_main_module)	Úselfr   r   r	   r
   r   r   r   r   ©Ú	__class__r   úb/var/www/website-v5/atlas_env/lib/python3.8/site-packages/joblib/externals/loky/backend/process.pyr      s    úzLokyProcess.__init__c                 C   s,   t jdkrddlm} nddlm} || ƒS )NÚwin32é   )ÚPopen)ÚsysÚplatformZpopen_loky_win32r   Zpopen_loky_posix)Úprocess_objr   r   r   r   Ú_Popen'   s    
zLokyProcess._Popen)Ú__name__Ú
__module__Ú__qualname__Ú_start_methodr   Ústaticmethodr   Ú__classcell__r   r   r   r   r      s   ÷r   c                       s.   e Zd ZdZddddi df‡ fdd„	Z‡  ZS )ÚLokyInitMainProcessÚloky_init_mainNr   c              	      s   t ƒ j||||||dd� d S )NT)r   r   r	   r
   r   r   r   )r   r   )r   r   r   r	   r
   r   r   r   r   r   r   3   s    	ùzLokyInitMainProcess.__init__)r   r   r   r    r   r"   r   r   r   r   r#   0   s   ùr#   c                   @   s   e Zd Zdd„ ZdS )ÚAuthenticationKeyc                 C   s8   zt | ƒ W n tk
r(   tdƒ‚Y nX tt| ƒffS )NzGPickling an AuthenticationKey object is disallowed for security reasons)r   ÚRuntimeErrorÚ	TypeErrorr%   Úbytes)r   r   r   r   Ú
__reduce__M   s    ÿ
zAuthenticationKey.__reduce__N)r   r   r   r)   r   r   r   r   r%   L   s   r%   )	r   Úmultiprocessing.contextr   Zmultiprocessing.processr   r   r#   r(   r%   r   r   r   r   Ú<module>   s
   #