관리-도구
편집 파일: wait.cpython-38.pyc
U ʗRe � @ s� d dl Z d dlZd dlZd dlmZ zd dlmZ W n ek rT d dlmZ Y nX dddgZG dd� de �Z ejd kr�d d� Zndd� 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-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/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� | }z | |�W S ttjfk r� } zF|jd tjkrR� n.|t� }|dk rhd}|t d�krxd }W Y �qW 5 d }~X Y qX qd S )N�infr )�floatr �OSError�select�error�args�errnoZEINTR)r r �deadline�er r r r / s Fc C sd |s|st d��g }g }|r&|�| � |r4|�| � ttj|||�}t||�\}}} t|p`|p`| �S )N�2must 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_socketF s r'