File: D:/Python311/Lib/multiprocessing/__pycache__/context.cpython-311.pyc
�
��Vc�. � �0 � d dl Z d dlZd dlZddlmZ ddlmZ dZ G d� de� � Z G d� d e� � Z G d
� de� � Z
G d� d
e� � Z G d� de� � Z
G d� dej � � Z G d� de
� � Zej dk r� G d� dej � � Z G d� dej � � Z G d� dej � � Z G d� de
� � Z G d� de
� � Z G d� d e
� � Z e� � e� � e� � d!�Zej d"k r eed# � � ZnP eed$ � � Zn> G d%� dej � � Z G d&� de
� � Zd# e� � iZ eed# � � Zd'� Z ej � � Zd(� Zd)� Zd*� ZdS )+� N� )�process)� reduction� c � � e Zd ZdS )�ProcessErrorN��__name__�
__module__�__qualname__r � �+D:\Python311\Lib\multiprocessing\context.pyr r � � � � � � ��Dr
r c � � e Zd ZdS )�BufferTooShortNr r r
r r r r r
r c � � e Zd ZdS )�TimeoutErrorNr r r
r r r r r
r c � � e Zd ZdS )�AuthenticationErrorNr r r
r r r r r
r c � � e Zd ZeZeZeZeZ eej � � Z eej
� � Z
eej � � Zd� Zd� Z
d&d�Zd� Zd� Zd'd�Zd(d
�Zd(d�Zd� Zd)d
�Zd*d�Zd*d�Zd� Z d+d�Zd� Zd� Zdd�d�Zdd�d�Zd� Zd� Zd'd�Z d� Z!d� Z"d� Z#d'd�Z$d,d!�Z%d,d"�Z&e'd#� � � Z(e(j) d$� � � Z(d%� Z*dS )-�BaseContextc �N � t j � � }|�t d� � �|S )z(Returns the number of CPUs in the systemNzcannot determine number of cpus)�os� cpu_count�NotImplementedError)�self�nums r r zBaseContext.cpu_count) s) � ��l�n�n��� �%�&G�H�H�H��Jr
c �v � ddl m} || � � � �� � }|� � � |S )z�Returns a manager associated with a running server process
The managers methods such as `Lock()`, `Condition()` and `Queue()`
can be used to create shared objects.
r )�SyncManager��ctx)�managersr �get_context�start)r r �ms r �ManagerzBaseContext.Manager1 sF � � *�)�)�)�)�)��K�D�,�,�.�.�/�/�/�� ��� � � ��r
Tc �$ � ddl m} ||� � S )z1Returns two connection object connected by a piper )�Pipe)�
connectionr( )r �duplexr( s r r( zBaseContext.Pipe<