AlkantarClanX12
Current Path : /opt/alt/python37/lib64/python3.7/multiprocessing/__pycache__/ |
Current File : //opt/alt/python37/lib64/python3.7/multiprocessing/__pycache__/synchronize.cpython-37.pyc |
B � fA- � @ s, d dddddgZ ddlZddlZddlZddlZddlZdd lmZ dd lmZ ddlm Z yddlm Z mZ W n ek r� ed ��Y nX e ed��\ZZej jZG dd� de�Z G dd� de �ZG dd� de�ZG dd � d e �ZG dd� de �ZG dd� de�ZG dd� de�ZG dd� dej�ZdS )�Lock�RLock� Semaphore�BoundedSemaphore� Condition�Event� N� )�context)�process)�util)�SemLock� sem_unlinkz�This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.� c @ s\ e Zd Ze�� Zdd� Zedd� �Zdd� Z dd� Z d d � Zdd� Zd d� Z edd� �ZdS )r c C s� |d krt j�� }|�� }tjdkp*|dk}xPtd�D ]<}y t�|||| � � |� }| _ W n tk rn Y q6X P q6W td��t� d|j � | �� tjdkr�dd� } t�| | � | j jd k r�dd lm} | | j j� tj| tj| j jfd d� d S )N�win32�fork�d zcannot find name for semaphorezcreated semlock with handle %sc S s | j �� d S )N)�_semlock�_after_fork)�obj� r �@/opt/alt/python37/lib64/python3.7/multiprocessing/synchronize.pyr G s z%SemLock.__init__.<locals>._after_forkr )�registerr )Zexitpriority)r Z_default_contextZget_contextZget_start_method�sys�platform�range�_multiprocessingr � _make_namer �FileExistsErrorr �debug�handle� _make_methodsZregister_after_fork�name�semaphore_trackerr ZFinalize�_cleanup)�self�kind�value�maxvalue�ctxr! Z unlink_now�i�slr r r r r �__init__2 s. zSemLock.__init__c C s ddl m} t| � || � d S )Nr )� unregister)r"