+
    Dfj                      a  0 t $ R t^ RIHt ^ RIt^ RIt^ RIHtHt ^ RI	H
t
 ^ RIHtHtHt ^ RIHt ^ RIHt ^ RIHtHtHt ^ R	IHt ^ R
IHt RR lt]R8X  d   ]tM]P                  t ^ RIHt ]t]! R4      t#R R lt$R R lt%]! ]4       ! R R]PL                  ]4      4       t'R t(R.t)R#   ]  d    ]!tR]"R&    LMi ; i)z
Select reactor
)annotationsN)EBADFEINTR)sleep)CallableTypeTypeVar)implementer)	posixbase)IReactorFDSetIReadDescriptorIWriteDescriptor)log)platformTypec                    V '       g,   V'       g$   Vf   RpM\        VR4      p\        V4       . . . 3# Ve   VR8  d   Rp\        P                  ! WW4      w  rpWV,           . 3# )zWin32 select wrapper.g{Gz?gMbP?g      ?)minr   select)rwetimeouts   &&&&@/usr/lib/python3/dist-packages/twisted/internet/selectreactor.pywin32selectr      sd    ?G'5)Gg2rz 'C-mmA!-GA!!eR<    win32)_ThreadedWin32EventsMixinzType[object]
_extraBase_Tc               (    V ^8  d   QhRRRRRRRR/# )	   toPreenzlist[_T]	preenIntozset[_T]
disconnectz%Callable[[_T, Exception, bool], None]returnNone )formats   "r   __annotate__r'   :   s0     & &&& 6& 
	&r   c                   VP                  4        V  F1  p \        P                  ! V.V.V.^ 4       VP                  V4       K3  	  R#   \         d2   p\        P
                  ! RT,          4       T! Y4R4        Rp?Kn  Rp?ii ; i)    zbad descriptor %sFN)clearr   add	Exceptionr   msg)r    r!   r"   
selectabler   s   &&&  r   	_onePreenr/   :   st    
 OO
	&MM:,zlAF
 MM*%   	-GG'*45ze,,	-s   A

B&BBc               (    V ^8  d   QhRRRRRRRR/# )	r   readszset[IReadDescriptor]writeszset[IWriteDescriptor]r"   zECallable[[IReadDescriptor | IWriteDescriptor, Exception, bool], None]r#   r$   r%   )r&   s   "r   r'   r'   J   s1     	+ 	+	+!	+ V	+ 
		+r   c                    \         P                  ! R 4       \        V 4      p\        V4      p\        W0V4       \        WAV4       R# )z1Malformed file descriptor found.  Preening lists.N)r   r-   listr/   )r1   r2   r"   readerswriterss   &&&  r   _preenDescriptorsr7   J   s7    
 GG?@%)%[G&*6lGgj)gz*r   c                  l    ] tR t^VtRtR R ltR R ltR t]tR t	R t
R	 tR
 tR tR tR tR tRtR# )SelectReactora  
A select() based reactor - runs on all POSIX platforms and on Win32.

@ivar _reads: A set containing L{FileDescriptor} instances which will be
    checked for read events.

@ivar _writes: A set containing L{FileDescriptor} instances which will be
    checked for writability.
c                   V ^8  d   QhRR/# r   r#   r$   r%   )r&   s   "r   r'   SelectReactor.__annotate__b   s     2 2$ 2r   c                    \        4       V n        \        4       V n        \        P                  P                  V 4       R# )zF
Initialize file descriptor tracking dictionaries and the base class.
N)set_reads_writesr
   PosixReactorBase__init__selfs   &r   rB   SelectReactor.__init__b   s*     -0E.1e""++D1r   c                   V ^8  d   QhRR/# r;   r%   )r&   s   "r   r'   r<   j   s     Q Q4 Qr   c                	\    \        V P                  V P                  V P                  4       R # N)r7   r?   r@   _disconnectSelectablerC   s   &r   r7   SelectReactor._preenDescriptorsj   s    $++t||T5O5OPr   c                    \        V P                  V P                  . V4      w  r#pT P                  p\        P                  pTRT P                  3TRT P                  33 F   w  rp
T F  pY9  d   K  T! YY4       K  	  K"  	  R#   \         d    T P	                  4         R# \
         d*    \        P                  ! 4        T P	                  4         R# \         d   pTP                  ^ ,          R9   d,   T P                  '       g   T P                  '       g    Rp?R# h TP                  ^ ,          \        8X  d    Rp?R# TP                  ^ ,          \        8X  d   T P	                  4         Rp?R# h Rp?ii ; i)z
Run one iteration of the I/O monitor loop.

This will run all selectables who had input or output readiness
waiting for them.
NdoReaddoWrite)r)   r   )_selectr?   r@   
ValueErrorr7   	TypeErrorr   errOSErrorargsr   r   _doReadOrWritecallWithLogger)rD   r   r   r   ignoredse_drdw_logrunselectablesmethodfdsetr.   s   &&          r   doSelectSelectReactor.doSelectm   s4   	#DKKr7KMA'< ##$$$++&	4<<(+
&K *
 *
:> *	+
?  	""$ 	 GGI""$ 	 wwqzV#dlllu$u$&&( #	sG   %B E>%E>.&E>E> E>!)E9E9#E9,E98E99E>c                	     \        W4      ! 4       pV'       d   V P                  WVR8H  4       R# R#   \         d5    \        P                  ! 4       ^,          p\        P
                  ! 4         L_i ; i)   rL   N)getattrBaseExceptionsysexc_infor   rQ   rI   )rD   r.   r[   whys   &&& r   rT   SelectReactor._doReadOrWrite   s]    	*-/C &&z(8JK   	,,.#CGGI	s   3 <A21A2c                <    V P                   P                  V4       R# )zB
Add a FileDescriptor for notification of data available to read.
N)r?   r+   rD   readers   &&r   	addReaderSelectReactor.addReader   s     	r   c                <    V P                   P                  V4       R# )zC
Add a FileDescriptor for notification of data available to write.
N)r@   r+   rD   writers   &&r   	addWriterSelectReactor.addWriter   s     	 r   c                <    V P                   P                  V4       R# )zA
Remove a Selectable for notification of data available to read.
N)r?   discardrh   s   &&r   removeReaderSelectReactor.removeReader   s     	F#r   c                <    V P                   P                  V4       R# )zB
Remove a Selectable for notification of data available to write.
N)r@   rr   rm   s   &&r   removeWriterSelectReactor.removeWriter   s     	V$r   c                	N    V P                  V P                  V P                  4      # rH   )
_removeAllr?   r@   rC   s   &r   	removeAllSelectReactor.removeAll   s    t{{DLL99r   c                	,    \        V P                  4      # rH   )r4   r?   rC   s   &r   
getReadersSelectReactor.getReaders   s    DKK  r   c                	,    \        V P                  4      # rH   )r4   r@   rC   s   &r   
getWritersSelectReactor.getWriters   s    DLL!!r   )r?   r@   N)__name__
__module____qualname____firstlineno____doc__rB   r7   r]   doIterationrT   rj   ro   rs   rv   rz   r}   r   __static_attributes__r%   r   r   r9   r9   V   sH    2Q2?h KL !$%:!"r   r9   c                 6    \        4       p ^ RIHp V! V 4       R# )zDConfigure the twisted mainloop to be run using the select() reactor.)installReactorN)r9   twisted.internet.mainr   )reactorr   s     r   installr      s    oG47r   r   rH   )*__conditional_annotations__r   
__future__r   r   rc   errnor   r   timer   typingr   r   r   zope.interfacer	   twisted.internetr
   twisted.internet.interfacesr   r   r   twisted.pythonr   twisted.python.runtimer   r   rN   "twisted.internet.win32eventreactorr   r   ImportErrorobject__annotations__r   r/   r7   rA   r9   r   __all__)r   s   @r   <module>r      s   
 #  
   * * & & X X  /$ 7GmmG+L +JT]& 	+ ]t"I..
 t" t"n +I  &%J%&s   +B0 0C C