관리-도구
편집 파일: wait.cpython-36.pyc
3 �Re � @ s� d dl Z d dlmZ d dlZd dlZyd dlmZ W n ek rT d dlmZ Y nX dddgZG dd� de �Z ejdkr�dd� Znd d� Zddd�Z ddd�Zdd� Zdd� Zdd� addd�Zddd�ZdS ) � N)�partial)� monotonic)�time�NoWayToWaitForSocketError� wait_for_read�wait_for_writec @ s e Zd ZdS )r N)�__name__� __module__�__qualname__� r r ��/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/urllib3/util/wait.pyr s � � c C s | |�S )Nr )�fn�timeoutr r r �_retry_on_intr* s r c C s� |d krt d�}n t� | }xry| |�S ttjfk r� } zB|jd tjkrR� n(|t� }|dk rhd}|t d�krxd }wW Y d d }~X qX qW d S )N�infr )�floatr �OSError�select�error�args�errnoZEINTR)r r �deadline�er r r r 0 s Fc C sh | r| rt d��g }g }|r*|j| � |r8|j| � ttj|||�}t||�\}}} t|pd|pd| �S )Nz2must specify at least one of read=True, write=True)�RuntimeError�appendr r r �bool) �sock�read�writer �rcheck�wcheckr �rready�wready�xreadyr r r �select_wait_for_socketG s r&