관리-도구
편집 파일: resource_sharer.cpython-310.opt-2.pyc
o 6��f � @ s� d dl Z d dlZd dlZd dlZd dlZddlmZ ddlmZ ddlm Z dgZ ejdkr<e dg7 Z G d d� de�Z n e d g7 Z G dd � d e�ZG dd � d e�Ze� ZejZdS )� N� )�process)� reduction)�util�stopZwin32� DupSocketc @ � e Zd Z dd� Zdd� ZdS )r c s( |� � � � fdd�}t�|� j�| _d S )Nc s � � |�}| �|� d S �N)�shareZ send_bytes)�conn�pidr �Znew_sock� �F/opt/alt/python310/lib64/python3.10/multiprocessing/resource_sharer.py�send s z DupSocket.__init__.<locals>.send)�dup�_resource_sharer�register�close�_id)�selfZsockr r r r �__init__ s zDupSocket.__init__c C sD t �| j��}|�� }t�|�W d � S 1 sw Y d S r )r �get_connectionr Z recv_bytes�socketZ fromshare)r r r r r r �detach$ s $�zDupSocket.detachN��__name__� __module__�__qualname__r r r r r r r s �DupFdc @ r )r c s4 t �|�� � fdd�}� fdd�}t�||�| _d S )Nc s t �| � |� d S r )r Zsend_handle)r r �Znew_fdr r r 1 s zDupFd.__init__.<locals>.sendc s t �� � d S r )�osr r r r r r 3 s zDupFd.__init__.<locals>.close)r! r r r r )r �fdr r r r r r / s zDupFd.__init__c C s<