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 )	LokyProcessZlokyN Fc	           	         s<   t  j||||||d |d kr$i n|| _| j| _|| _d S )N)grouptargetnameargskwargsdaemon)super__init__envZauthkeyinit_main_module)	selfr   r   r   r	   r
   r   r   r   	__class__r   f/var/www/html/Darija-Ai-Train/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)Z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 )LokyInitMainProcessZ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   Zmultiprocessing.contextr   Zmultiprocessing.processr   r   r    r$   r!   r   r   r   r   <module>   s
   #