Your IP : 18.221.248.140
���]/ � @ s� d d d d d d g Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d
l m Z d d l m Z d d l m
Z
y d d
l m Z m Z Wn* e
k
r� e
d d d d � � Yn Xe e d � � \ Z Z e j j Z Gd d � d e � Z Gd d � d e � Z Gd d � d e � Z Gd d � d e � Z Gd d � d e � Z Gd d � d e � Z Gd d � d e � Z Gd d � d e j � Z d S)�Lock�RLock� Semaphore�BoundedSemaphore� Condition�Event� N)�time� )�context)�process)�util)�SemLock�
sem_unlinkz*This platform lacks a functioning sem_openz( implementation, therefore, the requiredz+ synchronization primitives needed will notz function, see issue 3770.� c @ s� e Z d Z e j � Z d d � Z e d d � � Z d d � Z d d � Z
d d
� Z d d � Z d
d � Z
e d d � � Z d S)r
c
C sK | d k r t j j � } | j � } t j d k p? | d k } xb t d � D]H } y, t j | | | | j � | � } | _
Wn t k
r� YqO XPqO Wt d � � t j
d | j � | j � t j d k r� d d � } t j | | � | j
j d k rGd d l m }
|
| j
j � t j | t j | j
j f d
d �d S)N�win32�fork�d zcannot find name for semaphorezcreated semlock with handle %sc S s | j j � d S)N)�_semlock�_after_fork)�obj� r �0/opt/alt/python35/lib64/python3.5/synchronize.pyr H s z%SemLock.__init__.<locals>._after_forkr )�register�exitpriorityr )r
�_default_context�get_context�get_start_method�sys�platform�range�_multiprocessingr
�
_make_namer �FileExistsErrorr �debug�handle�
_make_methods�register_after_fork�name�semaphore_trackerr �Finalize�_cleanup)�self�kind�value�maxvalue�ctxr'