uawdijnntqw1x1x1
IP : 18.223.206.116
Hostname : host45.registrar-servers.com
Kernel : Linux host45.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
.
/
..
/
lib64
/
python3.6
/
multiprocessing
/
__pycache__
/
resource_sharer.cpython-36.opt-2.pyc
/
/
3 \��@s�ddlZddlZddlZddlZddlZddlmZddlmZddlm Z dgZ ejdkrxe dg7Z Gd d�de�Z ne d g7Z Gdd �d e�ZGdd �d e�Ze�ZejZdS)�N�)�process)� reduction)�util�stopZwin32� DupSocketc@seZdZdd�Zdd�ZdS)rcs(|j���fdd�}tj|�j�|_dS)Ncs�j|�}|j|�dS)N)�shareZ send_bytes)�conn�pidr)�new_sock��7/usr/lib64/python3.6/multiprocessing/resource_sharer.py�sends z DupSocket.__init__.<locals>.send)�dup�_resource_sharer�register�close�_id)�selfZsockrr)rr �__init__szDupSocket.__init__c Cs*tj|j��}|j�}tj|�SQRXdS)N)r�get_connectionrZ recv_bytes�socketZ fromshare)rr rrrr �detach$szDupSocket.detachN)�__name__� __module__�__qualname__rrrrrr rs�DupFdc@seZdZdd�Zdd�ZdS)rcs4tj|���fdd�}�fdd�}tj||�|_dS)Ncstj|�|�dS)N)rZsend_handle)r r )�new_fdrr r1szDupFd.__init__.<locals>.sendcstj��dS)N)�osrr)rrr r3szDupFd.__init__.<locals>.close)rrrrr)r�fdrrr)rr r/s zDupFd.__init__c Cs"tj|j��}tj|�SQRXdS)N)rrrrZrecv_handle)rr rrr r7szDupFd.detachN)rrrrrrrrr r-sc@sJeZdZdd�Zdd�Zedd��Zddd �Zd d�Zdd �Z dd�Z dS)�_ResourceSharercCs@d|_i|_g|_tj�|_d|_d|_d|_t j |tj�dS)Nr) �_key�_cache� _old_locks� threading�Lock�_lock� _listener�_address�_threadrZregister_after_forkr � _afterfork)rrrr r?s z_ResourceSharer.__init__c CsN|j�>|jdkr|j�|jd7_||f|j|j<|j|jfSQRXdS)Nr)r&r(�_startr!r")rrrrrr rIs z_ResourceSharer.registercCs<ddlm}|\}}||tj�jd�}|j|tj�f�|S)Nr)�Client)�authkey)� connectionr,r�current_processr-rr�getpid)Zidentr,�address�key�crrr rRs z_ResourceSharer.get_connectionNcCs�ddlm}|j��|jdk r�||jtj�jd�}|jd�|j�|j j |�|j j�rdtj d�|jj�d|_ d|_d|_x |jj�D]\}\}}|�q�W|jj�WdQRXdS)Nr)r,)r-z._ResourceSharer thread did not stop when asked)r.r,r&r(rr/r-rrr)�joinZis_aliverZsub_warningr'r"�items�clear)rZtimeoutr,r3r2rrrrr r[s" z_ResourceSharer.stopcCsnx |jj�D]\}\}}|�qW|jj�|jj|j�tj�|_|jdk rX|jj �d|_d|_ d|_dS)N)r"r5r6r#�appendr&r$r%r'rr(r))rr2rrrrr r*ps z_ResourceSharer._afterforkcCsXddlm}tjd�|tj�jd�|_|jj|_ t j|jd�}d|_ |j�||_dS)Nr)�Listenerz0starting listener and thread for sending handles)r-)�targetT)r.r8r�debugrr/r-r'r1r(r$ZThread�_serveZdaemon�startr))rr8�trrr r+~s z_ResourceSharer._startcCs�ttd�r tjtjtdtj��x�y\|jj��H}|j�}|dkrBP|\}}|j j |�\}}z|||�Wd|�XWdQRXWq"tj�s�t jt j��Yq"Xq"WdS)N�pthread_sigmaskr)�hasattr�signalr>� SIG_BLOCK�range�NSIGr'ZacceptZrecvr"�poprZ is_exiting�sys� excepthook�exc_info)rr �msgr2Zdestination_pidrrrrr r;�s z_ResourceSharer._serve)N)rrrrr�staticmethodrrr*r+r;rrrr r =s r )rr@rrEr$�r�contextrr�__all__�platform�objectrrr rrrrrr �<module>s `
/home/./../lib64/python3.6/multiprocessing/__pycache__/resource_sharer.cpython-36.opt-2.pyc