관리-도구
편집 파일: wait.cpython-39.pyc
a ��Re � @ s� d dl Z d dlZd dlZd dlmZ zd dlmZ W n eyR d dlmZ Y n0 g d�ZG dd� de �Z ejdkr�d d � Zndd � Zdd d�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-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_vendor/urllib3/util/wait.pyr s r )� � c C s | |�S )Nr )�fn�timeoutr r r �_retry_on_intr* s r c C s� |d u rt d�}n t� | }z | |�W S ttjfy� } zR|jd tjkrP� n2|t� }|dk rfd}|t d�krvd }W Y d }~qW Y d }~qd }~0 0 qd S )N�infr )�floatr �OSError�select�error�args�errnoZEINTR)r r �deadline�er r r r 0 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_socketG s r'