
    Ph                     "   d dl Z d dlZd dlmZmZ d dlmZ  ej                  d      Z ej                  d      Z		  e
e j                  e j                  f      Zd Z G d dej                         Zy# e$ r  e
e j                  f      ZY 3w xY w)	    N)patchersupport)hubselecttimec                  "    t        t        d      S )Nr   )hasattrr        `C:\Users\daisl\Desktop\realtime-object-detection\venv\Lib\site-packages\eventlet/hubs/selects.pyis_availabler      s    68$$r   c                       e Zd Zd ZddZy)Hubc                 h   t        | j                  | j                           t        | j                  | j                           z   }|D ]  }	 t        j	                  |gg g d        y# t        j
                  $ r6}t        j                  |      t        v r| j                  |       Y d}~dd}~ww xY w)z_ Iterate through fds, removing the ones that are bad per the
        operating system.
        r   N)
list	listenersREADWRITEr   errorr   	get_errnoBAD_SOCKremove_descriptor)selfall_fdsfdes       r   _remove_bad_fdszHub._remove_bad_fds   s     t~~dii01D

9S4TTB/rdBA.  << /$$Q'83**2./s   A((B1;,B,,B1Nc                    | j                   | j                     }| j                   | j                     }|s|s|rt        j	                  |       y t        |      }t        |      }||z   }	 t        j                  ||||      \  }}}	|	D ]`  }|j                  |t        j                         j#                  |       |j                  |t        j                         j#                  |       b ||f||ffD ]<  \  }}|D ]2  }	 |j                  |t        j                         j#                  |       4 > y # t        j                  $ ra}
t        j                  |
      t        j                  k(  rY d }
~
y t        j                  |
      t        v r| j                          Y d }
~
y  d }
~
ww xY w# | j$                  $ r   | j'                  |t)        j*                                t        j,                          Y xY wN)r   r   r   r   sleepr   r   r   r   r   errnoEINTRr   r   getr   noopcbSYSTEM_EXCEPTIONSsquelch_exceptionsysexc_infoclear_sys_exc_info)r   secondsreaderswriters
reader_fds
writer_fdsr   rwerr   filenor   eventss                 r   waitzHub.wait   s   ..+..,w

7#']
']
z)		}}ZWgNHAq" FKK),,V4KK),,V4  $+A,!!=Iv 1MM&#((366v> ! "> || 	  #u{{2""1%1$$&	" -- 1**63<<>B..0s1   +D4  /F+4F(&F#2+F#"F##F(+A	G6r   )__name__
__module____qualname__r   r5   r
   r   r   r   r      s    
/!1r   r   )r!   r(   eventletr   r   eventlet.hubsr   originalr   r   setEBADFWSAENOTSOCKr   AttributeErrorr   BaseHubr   r
   r   r   <module>rA      s     
 % 			(	#w#EKK!2!234H
%.1#++ .1  #EKK>"H#s   A3 3BB