관리-도구
편집 파일: resource_sharer.cpython-311.opt-2.pyc
� c��f � � � d dl Z d dlZd dlZd dlZd dlZddlmZ ddlmZ ddlm Z dgZ ej dk re dgz Z G d � de� � Z ne d gz Z G d� d e� � Z G d� d e� � Z e� � Zej ZdS )� N� )�process)� reduction)�util�stop�win32� DupSocketc � � e Zd Z d� Zd� ZdS )r c � �� |� � � ��fd�}t � |�j � � | _ d S )Nc �\ �� �� |� � }| � |� � d S �N)�share� send_bytes)�conn�pidr �new_socks ��F/opt/alt/python311/lib64/python3.11/multiprocessing/resource_sharer.py�sendz DupSocket.__init__.<locals>.send s, �� � ���s�+�+������&�&�&�&�&� )�dup�_resource_sharer�register�close�_id)�self�sockr r s @r �__init__zDupSocket.__init__ sH �� ��x�x�z�z�H� '� '� '� '� '� (�0�0��x�~�F�F�D�H�H�Hr c �� � t � | j � � 5 }|� � � }t j |� � cd d d � � S # 1 swxY w Y d S r )r �get_connectionr � recv_bytes�socket� fromshare)r r r s r �detachzDupSocket.detach$ s� � �C�!�0�0���:�:� /�d����)�)���'��.�.� /� /� /� /� /� /� /� /� /� /� /� /���� /� /� /� /� /� /s �(A�A�AN��__name__� __module__�__qualname__r r# � r r r r s8 � � � � � �-� G� G� G� /� /� /� /� /r �DupFdc � � e Zd Z d� Zd� ZdS )r) c � �� t j |� � ��fd�}�fd�}t � ||� � | _ d S )Nc �4 �� t j | �|� � d S r )r �send_handle)r r �new_fds �r r zDupFd.__init__.<locals>.send1 s �� ��%�d�F�C�8�8�8�8�8r c �0 �� t j � � � d S r )�osr )r. s �r r zDupFd.__init__.<locals>.close3 s �� ���� � � � � r )r0 r r r r )r �fdr r r. s @r r zDupFd.__init__/ s] �� ��V�B�Z�Z�F� 9� 9� 9� 9� 9� !� !� !� !� !�'�0�0��u�=�=�D�H�H�Hr c � � t � | j � � 5 }t j |� � cd d d � � S # 1 swxY w Y d S r )r r r r �recv_handle)r r s r r# zDupFd.detach7 s� � �?�!�0�0���:�:� 3�d� �,�T�2�2� 3� 3� 3� 3� 3� 3� 3� 3� 3� 3� 3� 3���� 3� 3� 3� 3� 3� 3s �A�A� ANr$ r( r r r) r) - s5 � � � � � �;� >� >� >� 3� 3� 3� 3� 3r c �L � e Zd Z d� Zd� Zed� � � Zd d�Zd� Zd� Z d� Z dS ) �_ResourceSharerc � � d| _ i | _ t j � � | _ d | _ d | _ d | _ t j | t j � � d S )Nr )�_key�_cache� threading�Lock�_lock� _listener�_address�_threadr �register_after_forkr5 � _afterfork)r s r r z_ResourceSharer.__init__? sP � ��� �����^�%�%�� ������ ����� ���'A�B�B�B�B�Br c �� � | j 5 | j �| � � � | xj dz c_ ||f| j | j <