§
    Hºi}  ã                   ó<  — d dl Z d dlZd dlZd dlZd dlmZ d dlmZ g d¢Z	 ej
        d¦  «        Ze                     ¦   «         ZdZ ed„ eD ¦   «         ¦  «        Z G d„ d	e¦  «        Zd
„ Zdd„Zd„ Zd dlmZ dddej        dfd„Zd„ Zd„ Z G d„ de¦  «        ZdS )é    N)Úpatcher)Ú	greenlets)Úuse_hubÚget_hubÚget_default_hubÚ
trampolineÚ	threading)ÚepollsÚkqueueÚpollÚselectsc              #   óD   K  — | ]}t          j        d |z   ¦  «        V — ŒdS )úeventlet.hubs.N)Ú	importlibÚimport_module)Ú.0Únames     ú[/home/mmwave/public_html/mmwave/venv/lib/python3.11/site-packages/eventlet/hubs/__init__.pyú	<genexpr>r      s4   è è € ÐkÐkÐQU�IÔ3Ð4DÀtÑ4KÑLÔLÐkÐkÐkÐkÐkÐkó    c                   ó   — e Zd ZdS )ÚHubErrorN©Ú__name__Ú
__module__Ú__qualname__© r   r   r   r      ó   € € € € € Ø€Dr   r   c                  ó”   — t           D ]} |                      ¦   «         r| c S Œt          d                     t           ¦  «        ¦  «        ‚)a  Select the default hub implementation based on what multiplexing
    libraries are installed.  The order that the hubs are tried is:

    * epoll
    * kqueue
    * poll
    * select

    .. include:: ../../doc/source/common.txt
    .. note :: |internal|
    z"no built-in hubs are available: {})Úbuiltin_hub_modulesÚis_availabler   Úformat©Úmods    r   r   r      sU   € õ #ð ð ˆØ×ÒÑÔð 	ØˆJˆJˆJð	õ Ð7×>Ò>Õ?RÑSÔSÑ
TÔ
TÐTr   c                 ó  — | € t           j                             dd¦  «        } | €t          ¦   «         } t	          t
          d¦  «        rt
          `d}t          | t          ¦  «        rt|  	                    ¦   «         dk    rt          d¦  «        ‚d| v sd| v r,|  	                    ¦   «                              d¦  «        \  }}}nd| z   }t          j        |¦  «        } t	          | d	¦  «        r7|                      ¦   «         s"t          d
                     | ¦  «        ¦  «        ‚n2d                     | ¬¦  «        }t#          j        |t&          d¬¦  «         | }t)          j        | ¦  «        st-          | |pd¦  «        }|t
          _        dS )aŠ  Use the module *mod*, containing a class called Hub, as the
    event hub. Usually not required; the default hub is usually fine.

    `mod` can be an actual hub class, a module, a string, or None.

    If `mod` is a class, use it directly.
    If `mod` is a module, use `module.Hub` class
    If `mod` is a string and contains either '.' or ':'
    then `use_hub` uses 'package.subpackage.module:Class' convention,
    otherwise imports `eventlet.hubs.mod`.
    If `mod` is None, `use_hub` uses the default hub.

    Only call use_hub during application initialization,
    because it resets the hub's state and any existing
    timers or listeners will never be resumed.

    These two threadlocal attributes are not part of Eventlet public API:
    - `threadlocal.Hub` (capital H) is hub constructor, used when no hub is currently active
    - `threadlocal.hub` (lowercase h) is active hub instance
    NÚEVENTLET_HUBÚhubÚ zNeed to specify a hubú.ú:r   r!   z3selected hub is not available on this system mod={}z¸Please provide `is_available()` function in your custom Eventlet hub {mod}.
It must return bool: whether hub supports current platform. See eventlet/hubs/{{epoll,kqueue}} for example.
r#   é   )Ú
stacklevelÚHub)ÚosÚenvironÚgetr   ÚhasattrÚ_threadlocalr'   Ú
isinstanceÚstrÚstripÚRuntimeErrorÚ	partitionr   r   r!   Ú	Exceptionr"   ÚwarningsÚwarnÚDeprecationWarningÚinspectÚisclassÚgetattrr-   )r$   Ú	classnameÚ
modulenameÚ_ÚmsgÚhubclasss         r   r   r   ,   sƒ  € ð* €{ÝŒj�nŠn˜^¨TÑ2Ô2ˆØ
€{ÝÑÔˆÝ�|˜UÑ#Ô#ð ÝÐà€IÝ�#•sÑÔð 2Ø�9Š9‰;Œ;˜"ÒÐÝÐ6Ñ7Ô7Ð7Ø�#ˆ:ˆ:˜ ˜˜Ø'*§y¢y¡{¤{×'<Ò'<¸SÑ'AÔ'AÑ$ˆJ˜˜9˜9à)¨CÑ/ˆJÝÔ% jÑ1Ô1ˆåˆs�NÑ#Ô#ð =Ø×ÒÑ!Ô!ð 	_ÝÐQ×XÒXÐY\Ñ]Ô]Ñ^Ô^Ð^ð	_ðç
‚Fˆs€F�O„Oð 	õ 	Œ�cÕ-¸!Ð<Ñ<Ô<Ð<à€HÝŒ?˜3ÑÔð 4Ý˜3 	Ð 2¨UÑ3Ô3ˆà…LÔÐÐr   c                  óä   — 	 t           j        } na# t          $ rT 	 t           j         n# t          $ r t	          ¦   «          Y nw xY wt                                ¦   «         x} t           _        Y nw xY w| S )zKGet the current event hub singleton object.

    .. note :: |internal|
    )r2   r'   ÚAttributeErrorr-   r   )r'   s    r   r   r   b   s‹   € ð
4ÝÔˆˆøÝð 4ð 4ð 4ð	ÝÔÐÐøÝð 	ð 	ð 	Ý‰IŒIˆIˆIˆIð	øøøå!-×!1Ò!1Ñ!3Ô!3Ð3ˆ�lÔÐÐð4øøøð €Js.   ‚ �
A-š'¦A-§A¿A-ÁAÁ(A-Á,A-)Útimeoutc                 óÆ  ‡— d}t          ¦   «         }t          j        ¦   «         Š|j        ‰u rt          d¦  «        ‚|r|rt          d¦  «        ‚	 |                      ¦   «         }n# t
          $ r | }Y nw xY w|�ˆfd„}	|                     ||	|¦  «        }	 |r)|                     |j        |‰j	        ‰j
        |¦  «        }
n*|r(|                     |j        |‰j	        ‰j
        |¦  «        }
	 | 	                    ¦   «         |                     |
¦  «         |�|                     ¦   «          S S # |                     |
¦  «         w xY w# |�|                     ¦   «          w w xY w)a<  Suspend the current coroutine until the given socket object or file
    descriptor is ready to *read*, ready to *write*, or the specified
    *timeout* elapses, depending on arguments specified.

    To wait for *fd* to be ready to read, pass *read* ``=True``; ready to
    write, pass *write* ``=True``. To specify a timeout, pass the *timeout*
    argument in seconds.

    If the specified *timeout* elapses before the socket is ready to read or
    write, *timeout_exc* will be raised instead of ``trampoline()``
    returning normally.

    .. note :: |internal|
    Nz0do not call blocking functions from the mainloopz1not allowed to trampoline for reading and writingc                 ó2   •— ‰                      | ¦  «         d S ©N)Úthrow)ÚexcÚcurrents    €r   Ú_timeoutztrampoline.<locals>._timeout“   s   ø€ à�MŠM˜#ÑÔÐÐÐr   )r   ÚgreenletÚ
getcurrentr6   ÚfilenorE   Úschedule_call_globalÚaddÚREADÚswitchrJ   ÚWRITEÚremoveÚcancel)ÚfdÚreadÚwriterF   Útimeout_excÚmark_as_closedÚtr'   rP   rM   ÚlistenerrL   s              @r   r   r   v   s™  ø€ ð" 	€AÝ
‰)Œ)€CÝÔ!Ñ#Ô#€GØ
„|�wÐÐÝÐMÑNÔNÐNØð P�ð PÝÐNÑOÔOÐOðØ—’‘”ˆˆøÝð ð ð ØˆˆˆðøøøàÐð	ð 	ð 	ð 	ð 	ð ×$Ò$ W¨h¸ÑDÔDˆðØð 	aØ—w’w˜sœx¨°´ÀÄÐP^Ñ_Ô_ˆHˆHØð 	aØ—w’w˜sœy¨&°'´.À'Ä-ÐQ_Ñ`Ô`ˆHð	!Ø—:’:‘<”<à�JŠJ�xÑ Ô Ð àˆ=Ø�HŠH‰JŒJˆJˆJð øð �JŠJ�xÑ Ô Ð Ð øøøøàˆ=Ø�HŠH‰JŒJˆJˆJð øøøs7   ÁA& Á&A5Á4A5ÂAE Ã-D- Ä E Ä-EÅE ÅE c                 óL   — t          ¦   «         }|                     | ¦  «         dS )zŽ
    A particular file descriptor has been explicitly closed. Register for any
    waiting listeners to be notified on the next run loop.
    N)r   Únotify_close©rX   r'   s     r   r`   r`   ¥   s'   € õ
 ‰)Œ)€CØ×Ò�RÑÔÐÐÐr   c                 óL   — t          ¦   «         }|                     | ¦  «         dS )aª  
    Some file descriptors may be closed 'silently' - that is, by the garbage
    collector, by an external library, etc. When the OS returns a file descriptor
    from an open call (or something similar), this may be the only indication we
    have that the FD has been closed and then recycled.
    We let the hub know that the old file descriptor is dead; any stuck listeners
    will be disabled and notified in turn.
    N)r   Úmark_as_reopenedra   s     r   Únotify_openedrd   ®   s'   € õ ‰)Œ)€CØ×Ò˜ÑÔÐÐÐr   c                   ó   — e Zd ZdS )ÚIOClosedNr   r   r   r   rf   rf   »   r   r   rf   rI   )r   r<   r.   r9   Úeventletr   Úeventlet.supportr   rN   Ú__all__Úoriginalr	   Úlocalr2   Úbuiltin_hub_namesÚtupler    r8   r   r   r   r   rF   ÚTimeoutr   r`   rd   ÚIOErrorrf   r   r   r   ú<module>rp      s“  ðØ Ð Ð Ð Ø €€€Ø 	€	€	€	Ø €€€à Ð Ð Ð Ð Ð Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2ð BÐ
AÐ
A€àˆGÔ˜[Ñ)Ô)€	Ø�ŠÑ Ô €ð <Ð Ø�eÐkÐkÐYjÐkÑkÔkÑkÔkÐ ð	ð 	ð 	ð 	ð 	ˆyñ 	ô 	ð 	ðUð Uð Uð&3 ð 3 ð 3 ð 3 ðlð ð ð" Ð Ð Ð Ð Ð ð  D°$Ø"œ?Ø"ð,ð ,ð ,ð ,ð^ð ð ð
ð 
ð 
ð	ð 	ð 	ð 	ð 	ˆwñ 	ô 	ð 	ð 	ð 	r   