+
    ‚V@i-’  ã                   ó   € R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIHt ^ RIHtHtHtHtHt ^ RIHt ^ RIHtHtHt ^ RIt^ RIHtHtHtHtH t H!t!H"t"H#t# ]PH                  '       d   ^ RIH%t%H&t&H't'H(t( ^ RI)H*t* M]+t* ! R	 R
]*4      t,]!! R4      t-]!! R],R7      t. ! R R]4      t/ ! R R4      t0 ! R R4      t1R# )a©  An I/O event loop for non-blocking sockets.

In Tornado 6.0, `.IOLoop` is a wrapper around the `asyncio` event loop, with a
slightly different interface. The `.IOLoop` interface is now provided primarily
for backwards compatibility; new code should generally use the `asyncio` event
loop interface directly. The `IOLoop.current` class method provides the
`IOLoop` instance corresponding to the running `asyncio` event loop.

N)Úisawaitable)ÚFutureÚ	is_futureÚchain_futureÚfuture_set_exc_infoÚfuture_add_done_callback)Úapp_log)ÚConfigurableÚTimeoutErrorÚimport_object)ÚUnionÚAnyÚTypeÚOptionalÚCallableÚTypeVarÚTupleÚ	Awaitable)ÚDictÚListÚSetÚ	TypedDict)ÚProtocolc                   óD   a € ] tR t^<t o V 3R lR ltV 3R lR ltRtV tR# )Ú_Selectablec                ó    <€ V ^8„  d   QhRS[ /# ©é   Úreturn)Úint)ÚformatÚ__classdict__s   "€Ú0/usr/lib/python3/dist-packages/tornado/ioloop.pyÚ__annotate__Ú_Selectable.__annotate__=   s   ø€ ÷ ñ ™ñ ó    c                ó   € R # ©N© ©Úselfs   &r"   ÚfilenoÚ_Selectable.fileno=   ó   € Ùr%   c                ó   <€ V ^8„  d   QhRR/# ©r   r   Nr(   )r    r!   s   "€r"   r#   r$   @   s   ø€ ÷ ñ �tñ r%   c                ó   € R # r'   r(   r)   s   &r"   ÚcloseÚ_Selectable.close@   r-   r%   r(   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r+   r1   Ú__static_attributes__Ú__classdictcell__©r!   s   @r"   r   r   <   s   ø‡ € ÷ð ÷ö r%   r   Ú_TÚ_S)Úboundc                   ó.  a a€ ] tR t^Ht oRt^ t^t^t^t]	! 4       t
]! 4       t]V3R lV 3R ll4       t]V3R lR l4       tV3R lR lt]V3R lR	 l4       t]P(                  ]V3R
 lR l4       4       t]P(                  ]RUV3R lR ll4       4       t]RUV3R lR ll4       tV3R lR ltV3R lR lt]V3R lR l4       t]V3R lR l4       tV3R lR lt]V3R lR l4       t]V3R lR l4       tRUV3R lR lltRVV3R  lR! llt]P(                  V3R" lR# l4       t]P(                  V3R$ lR% l4       tV3R& lR' ltV3R( lR) lt V3R* lR+ lt!V3R, lR- lt"V3R. lR/ lt#RWV3R0 lR1 llt$V3R2 lR3 lt%V3R4 lR5 lt&V3R6 lR7 lt'V3R8 lR9 lt(V3R: lR; lt)V3R< lR= lt*V3R> lR? lt+V3R@ lRA lt,V3RB lRC lt-V3RD lRE lt.V3RF lRG lt/V3RH lRI lt0V3RJ lRK lt1V3RL lRM lt2V3RN lRO lt3V3RP lRQ lt4V3RR lRS lt5RTt6Vt7V ;t8# )XÚIOLoopað
  An I/O event loop.

As of Tornado 6.0, `IOLoop` is a wrapper around the `asyncio` event loop.

Example usage for a simple TCP server:

.. testcode::

    import asyncio
    import errno
    import functools
    import socket

    import tornado
    from tornado.iostream import IOStream

    async def handle_connection(connection, address):
        stream = IOStream(connection)
        message = await stream.read_until_close()
        print("message from client:", message.decode().strip())

    def connection_ready(sock, fd, events):
        while True:
            try:
                connection, address = sock.accept()
            except BlockingIOError:
                return
            connection.setblocking(0)
            io_loop = tornado.ioloop.IOLoop.current()
            io_loop.spawn_callback(handle_connection, connection, address)

    async def main():
        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
        sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
        sock.setblocking(0)
        sock.bind(("", 8888))
        sock.listen(128)

        io_loop = tornado.ioloop.IOLoop.current()
        callback = functools.partial(connection_ready, sock)
        io_loop.add_handler(sock.fileno(), callback, io_loop.READ)
        await asyncio.Event().wait()

    if __name__ == "__main__":
        asyncio.run(main())

Most applications should not attempt to construct an `IOLoop` directly,
and instead initialize the `asyncio` event loop and use `IOLoop.current()`.
In some cases, such as in test frameworks when initializing an `IOLoop`
to be run in a secondary thread, it may be appropriate to construct
an `IOLoop` with ``IOLoop(make_current=False)``.

In general, an `IOLoop` cannot survive a fork or be shared across processes
in any way. When multiple processes are being used, each process should
create its own `IOLoop`, which also implies that any objects which depend on
the `IOLoop` (such as `.AsyncHTTPClient`) must also be created in the child
processes. As a guideline, anything that starts processes (including the
`tornado.process` and `multiprocessing` modules) should do so as early as
possible, ideally the first thing the application does after loading its
configuration, and *before* any calls to `.IOLoop.start` or `asyncio.run`.

.. versionchanged:: 4.2
   Added the ``make_current`` keyword argument to the `IOLoop`
   constructor.

.. versionchanged:: 5.0

   Uses the `asyncio` event loop by default. The ``IOLoop.configure`` method
   cannot be used on Python 3 except to redundantly specify the `asyncio`
   event loop.

.. versionchanged:: 6.3
   ``make_current=True`` is now the default when creating an IOLoop -
   previously the default was to make the event loop current if there wasn't
   already a current one.
c                ó(   <€ V ^8„  d   QhRRRS[ RR/# )r   Úimplz$Union[None, str, Type[Configurable]]Úkwargsr   N)r   )r    r!   s   "€r"   r#   ÚIOLoop.__annotate__¬   s%   ø€ ÷ 	*ñ 	*Ø9ð	*ÙEHð	*à	ñ	*r%   c                óÜ   <€ ^ RI Hp \        V\        4      '       d   \	        V4      p\        V\
        4      '       d   \        W4      '       g   \        R4      h\        SV `$  ! V3/ VB  R# )é    )ÚBaseAsyncIOLoopz5only AsyncIOLoop is allowed when asyncio is availableN)
Útornado.platform.asynciorE   Ú
isinstanceÚstrr   ÚtypeÚ
issubclassÚRuntimeErrorÚsuperÚ	configure)Úclsr@   rA   rE   Ú	__class__s   &&, €r"   rM   ÚIOLoop.configure«   sT   ø€ õ 	=ä�dœC× Ò Ü  Ó&ˆDÜ�dœD×!Ò!¬*°T×*KÒ*KÜÐVÓWÐWÜ‰Ò˜$Ñ) &Ô)r%   c                ó   <€ V ^8„  d   QhRR/# ©r   r   r>   r(   )r    r!   s   "€r"   r#   rB   ¸   s   ø€ ÷  ñ  �hñ  r%   c                 ó*   € \         P                  4       # )aÛ  Deprecated alias for `IOLoop.current()`.

.. versionchanged:: 5.0

   Previously, this method returned a global singleton
   `IOLoop`, in contrast with the per-thread `IOLoop` returned
   by `current()`. In nearly all cases the two were the same
   (when they differed, it was generally used from non-Tornado
   threads to communicate back to the main thread's `IOLoop`).
   This distinction is not present in `asyncio`, so in order
   to facilitate integration with that package `instance()`
   was changed to be an alias to `current()`. Applications
   using the cross-thread communications aspect of
   `instance()` should instead set their own global variable
   to point to the `IOLoop` they want to use.

.. deprecated:: 5.0
)r>   Úcurrentr(   r%   r"   ÚinstanceÚIOLoop.instance·   s   € ô( �~‰~ÓÐr%   c                ó   <€ V ^8„  d   QhRR/# r/   r(   )r    r!   s   "€r"   r#   rB   Í   s   ø€ ÷ ñ ˜ñ r%   c                ó&   € V P                  4        R# )a(  Deprecated alias for `make_current()`.

.. versionchanged:: 5.0

   Previously, this method would set this `IOLoop` as the
   global singleton used by `IOLoop.instance()`. Now that
   `instance()` is an alias for `current()`, `install()`
   is an alias for `make_current()`.

.. deprecated:: 5.0
N)Úmake_currentr)   s   &r"   ÚinstallÚIOLoop.installÍ   s   € ð 	×ÑÖr%   c                ó   <€ V ^8„  d   QhRR/# r/   r(   )r    r!   s   "€r"   r#   rB   Ü   s   ø€ ÷ ñ ˜Dñ r%   c                 ó.   € \         P                  4        R# )a3  Deprecated alias for `clear_current()`.

.. versionchanged:: 5.0

   Previously, this method would clear the `IOLoop` used as
   the global singleton by `IOLoop.instance()`. Now that
   `instance()` is an alias for `current()`,
   `clear_instance()` is an alias for `clear_current()`.

.. deprecated:: 5.0

N)r>   Úclear_currentr(   r%   r"   Úclear_instanceÚIOLoop.clear_instanceÛ   s   € ô 	×ÑÖr%   c                ó   <€ V ^8„  d   QhRR/# rR   r(   )r    r!   s   "€r"   r#   rB   í   s   ø€ ÷ ñ �Xñ r%   c                 ó   € R # r'   r(   r(   r%   r"   rT   ÚIOLoop.currentë   ó   € ñ 	r%   c                ó4   <€ V ^8„  d   QhRS[ RS[R,          /# ©r   rU   r   r>   ©Úboolr   )r    r!   s   "€r"   r#   rB   ò   s    ø€ ÷ ñ ™$ð ©(°8Õ*<ñ r%   c                ó   € R # r'   r(   ©rU   s   &r"   rT   rc   ð   rd   r%   c                ó4   <€ V ^8„  d   QhRS[ RS[R,          /# rf   rg   )r    r!   s   "€r"   r#   rB   ö   s    ø€ ÷ *ñ *™$ð *©(°8Õ*<ñ *r%   c                óD  €  \         P                  ! 4       p \
        P                  V,          #   \         d:    T '       g    R# \         P                  ! 4       p\         P                  ! T4        L[i ; i  \         d    T '       d   ^ RIH	p T! 4       p T# Rp T# i ; i)a«  Returns the current thread's `IOLoop`.

If an `IOLoop` is currently running or has been marked as
current by `make_current`, returns that instance.  If there is
no current `IOLoop` and ``instance`` is true, creates one.

.. versionchanged:: 4.1
   Added ``instance`` argument to control the fallback to
   `IOLoop.instance()`.
.. versionchanged:: 5.0
   On Python 3, control of the current `IOLoop` is delegated
   to `asyncio`, with this and other methods as pass-through accessors.
   The ``instance`` argument now controls whether an `IOLoop`
   is created automatically when there is none, instead of
   whether we fall back to `IOLoop.instance()` (which is now
   an alias for this method). ``instance=False`` is deprecated,
   since even if we do not create an `IOLoop`, this method
   may initialize the asyncio loop.

.. deprecated:: 6.2
   It is deprecated to call ``IOLoop.current()`` when no `asyncio`
   event loop is running.
N)ÚAsyncIOMainLoop)
ÚasyncioÚget_event_looprK   Únew_event_loopÚset_event_loopr>   Ú_ioloop_for_asyncioÚKeyErrorrF   rm   )rU   Úlooprm   rT   s   &   r"   rT   rc   õ   s�   € ð2	)Ü×)Ò)Ó+ˆDð	Ü×-Ñ-¨dÕ3Ð3øô ô 	)ßÚä×)Ò)Ó+ˆDÜ×"Ò" 4Ö(ð	)ûô ô 	ßÝDá)Ó+‘ð ˆð ‘Øˆð	ús2   ‚/ ˜A6 ¯A3Á+A3Á2A3Á6BÂ	BÂBÂBc                ó   <€ V ^8„  d   QhRR/# r/   r(   )r    r!   s   "€r"   r#   rB   "  s   ø€ ÷ ñ ˜dñ r%   c                ó`   € \         P                  ! R\        ^R7       V P                  4        R# )aƒ  Makes this the `IOLoop` for the current thread.

An `IOLoop` automatically becomes current for its thread
when it is started, but it is sometimes useful to call
`make_current` explicitly before starting the `IOLoop`,
so that code run at startup time can find the right
instance.

.. versionchanged:: 4.1
   An `IOLoop` created while there is no current `IOLoop`
   will automatically become current.

.. versionchanged:: 5.0
   This method also sets the current `asyncio` event loop.

.. deprecated:: 6.2
   Setting and clearing the current event loop through Tornado is
   deprecated. Use ``asyncio.set_event_loop`` instead if you need this.
z6make_current is deprecated; start the event loop first©Ú
stacklevelN)ÚwarningsÚwarnÚDeprecationWarningÚ_make_currentr)   s   &r"   rY   ÚIOLoop.make_current"  s'   € ô( 	�ŠØDÜØõ	
ð
 	×ÑÖr%   c                ó   <€ V ^8„  d   QhRR/# r/   r(   )r    r!   s   "€r"   r#   rB   =  s   ø€ ÷ $ñ $˜tñ $r%   c                ó   € \        4       hr'   ©ÚNotImplementedErrorr)   s   &r"   r|   ÚIOLoop._make_current=  s   € ä!Ó#Ð#r%   c                ó   <€ V ^8„  d   QhRR/# r/   r(   )r    r!   s   "€r"   r#   rB   B  s   ø€ ÷  ñ  ˜4ñ  r%   c                 óh   € \         P                  ! R\        ^R7       \        P	                  4        R# )z×Clears the `IOLoop` for the current thread.

Intended primarily for use by test frameworks in between tests.

.. versionchanged:: 5.0
   This method also clears the current `asyncio` event loop.
.. deprecated:: 6.2
zclear_current is deprecatedrw   N)ry   rz   r{   r>   Ú_clear_currentr(   r%   r"   r^   ÚIOLoop.clear_currentA  s'   € ô 	�ŠØ)ÜØõ	
ô
 	×ÑÖr%   c                ó   <€ V ^8„  d   QhRR/# r/   r(   )r    r!   s   "€r"   r#   rB   S  s   ø€ ÷ &ñ &˜Dñ &r%   c                 ó^   € \         P                  R R7      p V e   V P                  4        R# R# )Frj   N)r>   rT   Ú_clear_current_hook)Úolds    r"   r…   ÚIOLoop._clear_currentR  s(   € ä�n‰n eˆnÓ,ˆØŠ?Ø×#Ñ#Ö%ñ r%   c                ó   <€ V ^8„  d   QhRR/# r/   r(   )r    r!   s   "€r"   r#   rB   X  s   ø€ ÷ ñ  Tñ r%   c                ó   € R# )zInstance method called when an IOLoop ceases to be current.

May be overridden by subclasses as a counterpart to make_current.
Nr(   r)   s   &r"   r‰   ÚIOLoop._clear_current_hookX  s   € ñ
 	r%   c                ó0   <€ V ^8„  d   QhRS[ S[,          /# r   ©r   r	   )r    r!   s   "€r"   r#   rB   `  s   ø€ ÷ ñ ¡$¡|Õ"4ñ r%   c                ó   € \         # r'   )r>   )rN   s   &r"   Úconfigurable_baseÚIOLoop.configurable_base_  s   € äˆr%   c                ó0   <€ V ^8„  d   QhRS[ S[,          /# r   r�   )r    r!   s   "€r"   r#   rB   d  s   ø€ ÷ ñ ¡T©,Õ%7ñ r%   c                ó   € ^ RI Hp V# )rD   )ÚAsyncIOLoop)rF   r–   )rN   r–   s   & r"   Úconfigurable_defaultÚIOLoop.configurable_defaultc  s   € å8àÐr%   c                ó$   <€ V ^8„  d   QhRS[ RR/# )r   rY   r   N©rh   )r    r!   s   "€r"   r#   rB   i  s   ø€ ÷ !ñ !¡tð !°tñ !r%   c                ó:   € V'       d   V P                  4        R # R # r'   )r|   )r*   rY   s   &&r"   Ú
initializeÚIOLoop.initializei  s   € ßØ×ÑÖ ñ r%   c                ó$   <€ V ^8„  d   QhRS[ RR/# )r   Úall_fdsr   Nrš   )r    r!   s   "€r"   r#   rB   m  s   ø€ ÷ $ñ $™Tð $¨dñ $r%   c                ó   € \        4       h)a  Closes the `IOLoop`, freeing any resources used.

If ``all_fds`` is true, all file descriptors registered on the
IOLoop will be closed (not just the ones created by the
`IOLoop` itself).

Many applications will only use a single `IOLoop` that runs for the
entire lifetime of the process.  In that case closing the `IOLoop`
is not necessary since everything will be cleaned up when the
process exits.  `IOLoop.close` is provided mainly for scenarios
such as unit tests, which create and destroy a large number of
``IOLoops``.

An `IOLoop` must be completely stopped before it can be closed.  This
means that `IOLoop.stop()` must be called *and* `IOLoop.start()` must
be allowed to return before attempting to call `IOLoop.close()`.
Therefore the call to `close` will usually appear just after
the call to `start` rather than near the call to `stop`.

.. versionchanged:: 3.1
   If the `IOLoop` implementation supports non-integer objects
   for "file descriptors", those objects will have their
   ``close`` method when ``all_fds`` is true.
r€   )r*   rŸ   s   &&r"   r1   ÚIOLoop.closem  s   € ô2 "Ó#Ð#r%   c                óJ   <€ V ^8„  d   QhRS[ RS[S[ S[ .R3,          RS[ RR/# ©r   ÚfdÚhandlerNÚeventsr   )r   r   )r    r!   s   "€r"   r#   rB   ‰  s;   ø€ ÷ ñ ÙðÙ (©#©s¨°TÐ)9Õ :ðÙDGðà	ñr%   c                ó   € R # r'   r(   ©r*   r¤   r¥   r¦   s   &&&&r"   Úadd_handlerÚIOLoop.add_handlerˆ  ó   € ñ 	r%   c                óJ   <€ V ^8„  d   QhRS[ RS[S[ S[.R3,          RS[RR/# r£   )r;   r   r   )r    r!   s   "€r"   r#   rB   �  s:   ø€ ÷ ñ ÙðÙ'©©S¨	°4¨Õ8ðÙBEðà	ñr%   c                ó   € R # r'   r(   r¨   s   &&&&r"   r©   rª   Ž  r«   r%   c                óT   <€ V ^8„  d   QhRS[ S[S[3,          RS[R,          RS[RR/# )r   r¤   r¥   Nr¦   r   ).N)r   r   r   r   )r    r!   s   "€r"   r#   rB   ”  s<   ø€ ÷ $ñ $Ù™™[Ð(Õ)ð$Ù4<¸YÕ4Gð$ÙQTð$à	ñ$r%   c                ó   € \        4       h)aã  Registers the given handler to receive the given events for ``fd``.

The ``fd`` argument may either be an integer file descriptor or
a file-like object with a ``fileno()`` and ``close()`` method.

The ``events`` argument is a bitwise or of the constants
``IOLoop.READ``, ``IOLoop.WRITE``, and ``IOLoop.ERROR``.

When an event occurs, ``handler(fd, events)`` will be run.

.. versionchanged:: 4.0
   Added the ability to pass file-like objects in addition to
   raw file descriptors.
r€   r¨   s   &&&&r"   r©   rª   ”  s   € ô" "Ó#Ð#r%   c                ó@   <€ V ^8„  d   QhRS[ S[S[3,          RS[RR/# )r   r¤   r¦   r   N©r   r   r   )r    r!   s   "€r"   r#   rB   §  s,   ø€ ÷ $ñ $¡¡s©KÐ'7Õ!8ð $Á#ð $È$ñ $r%   c                ó   € \        4       h)z™Changes the events we listen for ``fd``.

.. versionchanged:: 4.0
   Added the ability to pass file-like objects in addition to
   raw file descriptors.
r€   )r*   r¤   r¦   s   &&&r"   Úupdate_handlerÚIOLoop.update_handler§  ó   € ô "Ó#Ð#r%   c                ó:   <€ V ^8„  d   QhRS[ S[S[3,          RR/# ©r   r¤   r   Nr±   )r    r!   s   "€r"   r#   rB   °  s%   ø€ ÷ $ñ $¡¡s©KÐ'7Õ!8ð $¸Tñ $r%   c                ó   € \        4       h)z•Stop listening for events on ``fd``.

.. versionchanged:: 4.0
   Added the ability to pass file-like objects in addition to
   raw file descriptors.
r€   ©r*   r¤   s   &&r"   Úremove_handlerÚIOLoop.remove_handler°  rµ   r%   c                ó   <€ V ^8„  d   QhRR/# r/   r(   )r    r!   s   "€r"   r#   rB   ¹  s   ø€ ÷ $ñ $�tñ $r%   c                ó   € \        4       h)zžStarts the I/O loop.

The loop will run until one of the callbacks calls `stop()`, which
will make the loop stop after the current event iteration completes.
r€   r)   s   &r"   ÚstartÚIOLoop.start¹  s   € ô "Ó#Ð#r%   c                ó   <€ V ^8„  d   QhRR/# r/   r(   )r    r!   s   "€r"   r#   rB   Á  s   ø€ ÷ $ñ $�dñ $r%   c                ó   € \        4       h)aY  Stop the I/O loop.

If the event loop is not currently running, the next call to `start()`
will return immediately.

Note that even after `stop` has been called, the `IOLoop` is not
completely stopped until `IOLoop.start` has also returned.
Some work that was scheduled before the call to `stop` may still
be run before the `IOLoop` shuts down.
r€   r)   s   &r"   ÚstopÚIOLoop.stopÁ  s   € ô "Ó#Ð#r%   c                ó<   <€ V ^8„  d   QhRS[ RS[S[,          RS[/# )r   ÚfuncÚtimeoutr   )r   r   Úfloatr   )r    r!   s   "€r"   r#   rB   Î  s+   ø€ ÷ U.ñ U.™Xð U.±¹µð U.É3ñ U.r%   c                ó†  a aa€ \         P                  '       d$   \        RR\        \        ,          R\
        /4      pRRRR/oR VVV 3R llpS P                  V4       Ve2   R VV 3R	 llpS P                  S P                  4       V,           V4      pS P                  4        Ve   S P                  X4       SR,          f   Q hSR,          P                  4       '       g   SR,          P                  4       '       g-   SR,          '       d   \        R
V,          4      h\        R4      hSR,          P                  4       # )aÿ  Starts the `IOLoop`, runs the given function, and stops the loop.

The function must return either an awaitable object or
``None``. If the function returns an awaitable object, the
`IOLoop` will run until the awaitable is resolved (and
`run_sync()` will return the awaitable's result). If it raises
an exception, the `IOLoop` will stop and the exception will be
re-raised to the caller.

The keyword-only argument ``timeout`` may be used to set
a maximum duration for the function.  If the timeout expires,
a `asyncio.TimeoutError` is raised.

This method is useful to allow asynchronous calls in a
``main()`` function::

    async def main():
        # do stuff...

    if __name__ == '__main__':
        IOLoop.current().run_sync(main)

.. versionchanged:: 4.3
   Returning a non-``None``, non-awaitable value is now an error.

.. versionchanged:: 5.0
   If a timeout occurs, the ``func`` coroutine will be cancelled.

.. versionchanged:: 6.2
   ``tornado.util.TimeoutError`` is now an alias to ``asyncio.TimeoutError``.
Ú
FutureCellÚfutureÚtimeout_calledNFc                ó   € V ^8„  d   QhRR/# r/   r(   )r    s   "r"   r#   Ú%IOLoop.run_sync.<locals>.__annotate__ô  s   € ÷ 	Oñ 	O�Tñ 	Or%   c                  ó~  <€  S! 4       p V e   ^ RI Hp V! V 4      p \        V 4      '       d   V SR&   M!\        4       pVSR&   VP	                  V 4        SR,          f   Q hSP                  SR,          V3R l4       R #   \
         d2    \        4       pTSR&   \        T\        P                  ! 4       4        Lgi ; i)N)Úconvert_yieldedrÊ   c                 ó$   <€ SP                  4       # r'   )rÂ   )rÊ   r*   s   &€r"   Ú<lambda>Ú.IOLoop.run_sync.<locals>.run.<locals>.<lambda>  s   ø€ À$Ç)Á)Ä+r%   )
Útornado.genrÏ   r   r   Ú
set_resultÚ	Exceptionr   ÚsysÚexc_infoÚ
add_future)ÚresultrÏ   ÚfutrÅ   Úfuture_cellr*   s      €€€r"   ÚrunÚIOLoop.run_sync.<locals>.runô  s­   ø€ ð+Ù›�ØÒ%Ý;á,¨VÓ4�Fô ˜V×$Ò$Ø,2�K Ò)ä ›(�CØ,/�K Ñ)Ø—N‘N 6Õ*Ø˜xÕ(Ò4Ð4Ð4Ø�O‰O˜K¨Õ1Ô3MÖNøô ô 9Ü“h�Ø(+�˜HÑ%Ü# C¬¯ª«Ö8ð9ús   ƒB  Â 9B<Â;B<c                ó   € V ^8„  d   QhRR/# r/   r(   )r    s   "r"   r#   rÍ     s   € ÷ 	 ñ 	  dñ 	 r%   c                  óŠ   <€ R S R&   S R,          f   Q hS R,          P                  4       '       g   SP                  4        R# R# )TrË   rÊ   N)ÚcancelrÂ   )rÛ   r*   s   €€r"   Útimeout_callbackÚ)IOLoop.run_sync.<locals>.timeout_callback  sC   ø€ à04�Ð,Ñ-ð
 # 8Õ,Ò8Ð8Ð8Ø" 8Õ,×3Ñ3×5Ò5Ø—I‘I–Kñ 6r%   z$Operation timed out after %s secondsz+Event loop stopped before Future completed.)ÚtypingÚTYPE_CHECKINGr   r   r   rh   Úadd_callbackÚadd_timeoutÚtimer¾   Úremove_timeoutÚ	cancelledÚdoner
   rK   rÙ   )r*   rÅ   rÆ   rÉ   rÜ   rá   Útimeout_handlerÛ   s   ff&    @r"   Úrun_syncÚIOLoop.run_syncÎ  s!  ú€ ô@ ××ÐÜ"Ø˜x¬´&Õ)9Ð;KÌTÐRóˆJð   Ð'7¸Ð?ˆ÷	Oò 	Oð* 	×Ñ˜#ÔØÒ÷	 ñ 	 ð "×-Ñ-¨d¯i©i«k¸GÕ.CÐEUÓVˆNØ�
‰
ŒØÒØ×Ñ Ô/Ø˜8Õ$Ò0Ð0Ð0Ø�xÕ ×*Ñ*×,Ò,°KÀÕ4I×4NÑ4N×4PÒ4PØÐ+×,Ô,Ü"Ð#IÈGÕ#SÓTÐTô #Ð#PÓQÐQØ˜8Õ$×+Ñ+Ó-Ð-r%   c                ó    <€ V ^8„  d   QhRS[ /# r   ©rÇ   )r    r!   s   "€r"   r#   rB   %  s   ø€ ÷ ñ ‘eñ r%   c                ó,   € \         P                   ! 4       # )aO  Returns the current time according to the `IOLoop`'s clock.

The return value is a floating-point number relative to an
unspecified time in the past.

Historically, the IOLoop could be customized to use e.g.
`time.monotonic` instead of `time.time`, but this is not
currently supported and so this method is equivalent to
`time.time`.

)rç   r)   s   &r"   rç   ÚIOLoop.time%  s   € ô �yŠy‹{Ðr%   c          
      ób   <€ V ^8„  d   QhRS[ S[S[P                  3,          RS[RS[RS[RS[/# )r   ÚdeadlineÚcallbackÚargsrA   r   )r   rÇ   ÚdatetimeÚ	timedeltar   r   Úobject)r    r!   s   "€r"   r#   rB   3  sT   ø€ ÷ 'Bñ 'Bá™™x×1Ñ1Ð1Õ2ð'Bñ ð'Bñ ð	'Bñ
 ð'Bñ 
ñ'Br%   c                óF  € \        V\        P                  4      '       d   V P                  ! W.VO5/ VB # \        V\        P
                  4      '       d;   V P                  ! V P                  4       VP                  4       ,           V.VO5/ VB # \        RV,          4      h)a  Runs the ``callback`` at the time ``deadline`` from the I/O loop.

Returns an opaque handle that may be passed to
`remove_timeout` to cancel.

``deadline`` may be a number denoting a time (on the same
scale as `IOLoop.time`, normally `time.time`), or a
`datetime.timedelta` object for a deadline relative to the
current time.  Since Tornado 4.0, `call_later` is a more
convenient alternative for the relative case since it does not
require a timedelta object.

Note that it is not safe to call `add_timeout` from other threads.
Instead, you must use `add_callback` to transfer control to the
`IOLoop`'s thread, and then call `add_timeout` from there.

Subclasses of IOLoop must implement either `add_timeout` or
`call_at`; the default implementations of each will call
the other.  `call_at` is usually easier to implement, but
subclasses that wish to maintain compatibility with Tornado
versions prior to 4.0 must use `add_timeout` instead.

.. versionchanged:: 4.0
   Now passes through ``*args`` and ``**kwargs`` to the callback.
úUnsupported deadline %r)	rG   ÚnumbersÚRealÚcall_atrö   r÷   rç   Útotal_secondsÚ	TypeError)r*   ró   rô   rõ   rA   s   &&&*,r"   ræ   ÚIOLoop.add_timeout3  s�   € ô@ �h¤§¡×-Ò-Ø—<’< ÐD°TÒD¸VÑDÐDÜ˜¤(×"4Ñ"4×5Ò5Ø—<’<Ø—	‘	“˜h×4Ñ4Ó6Õ6¸ðØCGòØKQñð ô Ð5¸Õ@ÓAÐAr%   c          
      ó8   <€ V ^8„  d   QhRS[ RS[RS[RS[RS[/# )r   Údelayrô   rõ   rA   r   ©rÇ   r   r   rø   )r    r!   s   "€r"   r#   rB   \  s<   ø€ ÷ Lñ LÙðLÙ&.ðLÙ7:ðLÙFIðLá	ñLr%   c                óZ   € V P                   ! V P                  4       V,           V.VO5/ VB # )aR  Runs the ``callback`` after ``delay`` seconds have passed.

Returns an opaque handle that may be passed to `remove_timeout`
to cancel.  Note that unlike the `asyncio` method of the same
name, the returned object does not have a ``cancel()`` method.

See `add_timeout` for comments on thread-safety and subclassing.

.. versionadded:: 4.0
)rý   rç   )r*   r  rô   rõ   rA   s   &&&*,r"   Ú
call_laterÚIOLoop.call_later\  s*   € ð �|Š|˜DŸI™I›K¨%Õ/°ÐK¸DÒKÀFÑKÐKr%   c          
      ó8   <€ V ^8„  d   QhRS[ RS[RS[RS[RS[/# )r   Úwhenrô   rõ   rA   r   r  )r    r!   s   "€r"   r#   rB   k  s<   ø€ ÷ Añ AÙðAÙ%-ðAÙ69ðAÙEHðAá	ñAr%   c                ó.   € V P                   ! W.VO5/ VB # )a¦  Runs the ``callback`` at the absolute time designated by ``when``.

``when`` must be a number using the same reference point as
`IOLoop.time`.

Returns an opaque handle that may be passed to `remove_timeout`
to cancel.  Note that unlike the `asyncio` method of the same
name, the returned object does not have a ``cancel()`` method.

See `add_timeout` for comments on thread-safety and subclassing.

.. versionadded:: 4.0
)ræ   )r*   r  rô   rõ   rA   s   &&&*,r"   rý   ÚIOLoop.call_atk  s   € ð  ×Ò Ð@°Ò@¸Ñ@Ð@r%   c                ó$   <€ V ^8„  d   QhRS[ RR/# )r   rÆ   r   N)rø   )r    r!   s   "€r"   r#   rB   }  s   ø€ ÷ $ñ $¡fð $°ñ $r%   c                ó   € \        4       h)z£Cancels a pending timeout.

The argument is a handle as returned by `add_timeout`.  It is
safe to call `remove_timeout` even if the callback has already
been run.
r€   )r*   rÆ   s   &&r"   rè   ÚIOLoop.remove_timeout}  rµ   r%   c                ó0   <€ V ^8„  d   QhRS[ RS[RS[RR/# ©r   rô   rõ   rA   r   N©r   r   )r    r!   s   "€r"   r#   rB   †  s)   ø€ ÷ 
$ñ 
$¡Xð 
$±cð 
$ÁSð 
$ÈTñ 
$r%   c                ó   € \        4       h)a¡  Calls the given callback on the next I/O loop iteration.

It is safe to call this method from any thread at any time,
except from a signal handler.  Note that this is the **only**
method in `IOLoop` that makes this thread-safety guarantee; all
other interaction with the `IOLoop` must be done from that
`IOLoop`'s thread.  `add_callback()` may be used to transfer
control from other threads to the `IOLoop`'s thread.
r€   ©r*   rô   rõ   rA   s   &&*,r"   rå   ÚIOLoop.add_callback†  s   € ô "Ó#Ð#r%   c                ó0   <€ V ^8„  d   QhRS[ RS[RS[RR/# r  r  )r    r!   s   "€r"   r#   rB   ’  s-   ø€ ÷ $ñ $Ù ð$Ù),ð$Ù8;ð$à	ñ$r%   c                ó   € \        4       h)aP  Calls the given callback on the next I/O loop iteration.

Intended to be afe for use from a Python signal handler; should not be
used otherwise.

.. deprecated:: 6.4
   Use ``asyncio.AbstractEventLoop.add_signal_handler`` instead.
   This method is suspected to have been broken since Tornado 5.0 and
   will be removed in version 7.0.
r€   r  s   &&*,r"   Úadd_callback_from_signalÚIOLoop.add_callback_from_signal’  s   € ô "Ó#Ð#r%   c                ó0   <€ V ^8„  d   QhRS[ RS[RS[RR/# r  r  )r    r!   s   "€r"   r#   rB   ¡  s)   ø€ ÷ 5ñ 5¡xð 5¹ð 5Ásð 5Ètñ 5r%   c                ó2   € V P                   ! V.VO5/ VB  R# )z�Calls the given callback on the next IOLoop iteration.

As of Tornado 6.0, this method is equivalent to `add_callback`.

.. versionadded:: 4.0
N©rå   r  s   &&*,r"   Úspawn_callbackÚIOLoop.spawn_callback¡  s   € ð 	×Ò˜(Ð4 TÒ4¨VÔ4r%   c                ó<   <€ V ^8„  d   QhRRRS[ R.R3,          RR/# )r   rÊ   z0Union[Future[_T], concurrent.futures.Future[_T]]rô   ú
Future[_T]Nr   )r   )r    r!   s   "€r"   r#   rB   ª  s:   ø€ ÷ Wñ WàBðWñ ˜L˜>¨4Ð/Õ0ðWð 
ñ	Wr%   c                ó®   a a€ \        V\        4      '       d   VP                  VV 3R l4       R# \        V4      '       g   Q h\	        VVV 3R l4       R# )a	  Schedules a callback on the ``IOLoop`` when the given
`.Future` is finished.

The callback is invoked with one argument, the
`.Future`.

This method only accepts `.Future` objects and not other
awaitables (unlike most of Tornado where the two are
interchangeable).
c                 óP   <€ SP                  \        P                  ! SV 4      4      # r'   )Ú_run_callbackÚ	functoolsÚpartial©Úfrô   r*   s   &€€r"   rÑ   Ú#IOLoop.add_future.<locals>.<lambda>Ã  s   ø€ ˜$×,Ñ,¬Y×->Ò->¸xÈÓ-KÔLr%   c                 ó(   <€ SP                  SV 4      # r'   r  r$  s   &€€r"   rÑ   r&  É  s   ø€ °t×7HÑ7HÈÐSTÔ7Ur%   N)rG   r   Úadd_done_callbackr   r   )r*   rÊ   rô   s   f&fr"   rØ   ÚIOLoop.add_futureª  sE   ù€ ô �fœf×%Ò%ð ×$Ñ$ÝLöô ˜V×$Ò$Ð$Ð$ô % VÕ-UÖVr%   c                ó|   <€ V ^8„  d   QhRS[ S[P                  P                  ,          RS[RS[3,          RS[RR/# )r   ÚexecutorrÅ   .rõ   r   r  )r   Ú
concurrentÚfuturesÚExecutorr   r:   r   )r    r!   s   "€r"   r#   rB   Ë  sM   ø€ ÷ ñ á™:×-Ñ-×6Ñ6Õ7ðñ �s™B�wÕðñ ð	ð
 
ñr%   c                ó"  a€ VfV   \        V R4      '       g8   ^ RIHp \        P                  P                  V! 4       ^,          R7      V n        V P                  pVP                  ! V.VO5!  p\        4       oV P                  VV3R l4       S# )z×Runs a function in a ``concurrent.futures.Executor``. If
``executor`` is ``None``, the IO loop's default executor will be used.

Use `functools.partial` to pass keyword arguments to ``func``.

.. versionadded:: 5.0
Ú	_executor)Ú	cpu_count)Úmax_workersc                 ó   <€ \        V S4      # r'   )r   )r%  Út_futures   &€r"   rÑ   Ú(IOLoop.run_in_executor.<locals>.<lambda>ä  s   ø€ ¬L¸¸HÔ,Er%   )
ÚhasattrÚtornado.processr1  r,  r-  ÚThreadPoolExecutorr0  Úsubmitr   rØ   )r*   r+  rÅ   rõ   r1  Úc_futurer4  s   &&&*  @r"   Úrun_in_executorÚIOLoop.run_in_executorË  s}   ø€ ð ÒÜ˜4 ×-Ò-Ý5ä!+×!3Ñ!3×!FÑ!FÙ!*£¨q¥ð "Gó "�”ð —~‘~ˆHØ—?’? 4Ð/¨$Ó/ˆô “8ˆØ�‰˜Ô"EÔFØˆr%   c                óL   <€ V ^8„  d   QhRS[ P                  P                  RR/# )r   r+  r   N)r,  r-  r.  )r    r!   s   "€r"   r#   rB   ç  s'   ø€ ÷ "ñ "©Z×-?Ñ-?×-HÑ-Hð "ÈTñ "r%   c                ó   € Wn         R# )zVSets the default executor to use with :meth:`run_in_executor`.

.. versionadded:: 5.0
N©r0  )r*   r+  s   &&r"   Úset_default_executorÚIOLoop.set_default_executorç  s	   € ð
 "Žr%   c                ó8   <€ V ^8„  d   QhRS[ . S[3,          RR/# )r   rô   r   Nr  )r    r!   s   "€r"   r#   rB   î  s(   ø€ ÷ Oñ O¡h¨r±3¨wÕ&7ð O¸Dñ Or%   c                ó<  €  V! 4       pVe6   ^ RI Hp  VP                  V4      pV P                  W P                  4       R# R#   TP
                   d     R# i ; i  \        P                   d     R# \         d    \        P                  ! RTRR7        R# i ; i)zhRuns a callback with error handling.

.. versionchanged:: 6.0

   CancelledErrors are no longer logged.
N)ÚgenúException in callback %rT©r×   )ÚtornadorD  rÏ   rØ   Ú_discard_future_resultÚBadYieldErrorrn   ÚCancelledErrorrÕ   r   Úerror)r*   rô   ÚretrD  s   &&  r"   r!  ÚIOLoop._run_callbackî  s™   € ð	OÙ“*ˆCØŠÝ'ðFØ×-Ñ-¨cÓ2�Cð —O‘O C×)DÑ)DÖEñ øð ×(Ñ(ô ò ð	ûô ×%Ñ%ô 	ÚÜô 	OÜ�MŠMÐ4°hÈ×NÐNð	Oús?   ‚A ”A ¥A ÁAÁA ÁAÁA ÁBÁ4BÁ=BÂBc                ó$   <€ V ^8„  d   QhRS[ RR/# )r   rÊ   r   N©r   )r    r!   s   "€r"   r#   rB     s   ø€ ÷ ñ ©Vð ¸ñ r%   c                ó&   € VP                  4        R# )z;Avoid unhandled-exception warnings from spawned coroutines.N)rÙ   )r*   rÊ   s   &&r"   rH  ÚIOLoop._discard_future_result  s   € à�‰Žr%   c                óh   <€ V ^8„  d   QhRS[ S[S[3,          RS[S[S[ S[S[3,          3,          /# )r   r¤   r   )r   r   r   r   )r    r!   s   "€r"   r#   rB     s;   ø€ ÷ ñ Ù™™[Ð(Õ)ðá	‰s‘E™#™{Ð*Õ+Ð+Õ	,ñr%   c                óX   € \        V\        4      '       d   W3# VP                  4       V3# r'   )rG   r   r+   r¹   s   &&r"   Úsplit_fdÚIOLoop.split_fd  s(   € ô$ �bœ#×ÒØ�6ˆMØ�y‰y‹{˜BˆÐr%   c                ó:   <€ V ^8„  d   QhRS[ S[S[3,          RR/# r·   r±   )r    r!   s   "€r"   r#   rB   &  s%   ø€ ÷ ñ ™5¡¡kÐ!1Õ2ð °tñ r%   c                ó¨   €  \        V\        4      '       d   \        P                  ! V4       R # VP                  4        R #   \         d     R # i ; ir'   )rG   r   Úosr1   ÚOSErrorr¹   s   &&r"   Úclose_fdÚIOLoop.close_fd&  s:   € ð	Ü˜"œc×"Ò"Ü—’˜–à—‘–
øÜô 	Úð	ús   ‚,A °A ÁAÁAc                ó$   <€ V ^8„  d   QhRS[ RR/# ©r   r%  r   NrO  )r    r!   s   "€r"   r#   rB   :  s   ø€ ÷ #ñ #¡ð #¨4ñ #r%   c                ó<   € V P                   P                  V4       R # r'   )Ú_pending_tasksÚadd©r*   r%  s   &&r"   Ú_register_taskÚIOLoop._register_task:  s   € Ø×Ñ×Ñ Ö"r%   c                ó$   <€ V ^8„  d   QhRS[ RR/# r]  rO  )r    r!   s   "€r"   r#   rB   =  s   ø€ ÷ 'ñ '¡&ð '¨Tñ 'r%   c                ó<   € V P                   P                  V4       R # r'   )r_  Údiscardra  s   &&r"   Ú_unregister_taskÚIOLoop._unregister_task=  s   € Ø×Ñ×#Ñ# AÖ&r%   r?  )T)Fr'   )9r3   r4   r5   r6   Ú__doc__ÚNONEÚREADÚWRITEÚERRORÚdictrr   Úsetr_  ÚclassmethodrM   ÚstaticmethodrU   rZ   r_   rã   ÚoverloadrT   rY   r|   r^   r…   r‰   r’   r—   rœ   r1   r©   r³   rº   r¾   rÂ   rì   rç   ræ   r  rý   rè   rå   r  r  rØ   r;  r@  r!  rH  rT  rZ  rb  rg  r7   r8   Ú__classcell__)rO   r!   s   @@r"   r>   r>   H   s‰  ù‡ € ñKð\ €DØ€DØ€EØ€Eñ ›&Ðñ “U€Nà÷	*ò 	*ó ð	*ð ÷ ó ð ÷*ð ð ÷ó ðð ‡_�_Ø÷ó ó ðð ‡_�_Ø÷ñ ó ó ðð ÷*ñ *ó ð*÷Xð ÷6$ð $ð ÷ ó ð ð  ÷&ó ð&÷
ð ð ÷ó ðð ÷ó ð÷
!ò !÷$ò $ð6 ‡_�_÷ó ðð
 ‡_�_÷ó ð÷
$ð $÷&$ð $÷$ð $÷$ð $÷$ð $÷U.ò U.÷nð ÷'Bð 'B÷RLð L÷Að A÷$$ð $÷
$ð 
$÷$ð $÷5ð 5÷Wð W÷Bð ÷8"ð "÷Oð O÷<ð ÷ð ÷,ð ÷(#ð #÷'÷ 'ð 'r%   r>   c                   ób   a € ] tR tRt o Rt. ROtV 3R lR ltV 3R lR ltV 3R lR ltR	t	V t
R
# )Ú_TimeoutiA  z2An IOLoop timeout, a UNIX timestamp and a callbackc                óB   <€ V ^8„  d   QhRS[ RS[. R3,          RS[RR/# )r   ró   rô   NÚio_loopr   )rÇ   r   r>   )r    r!   s   "€r"   r#   Ú_Timeout.__annotate__G  s6   ø€ ÷ 

ñ 

Ùð

Ù)1°"°d°(Õ);ð

ÙFLð

à	ñ

r%   c                óº   € \        V\        P                  4      '       g   \        R V,          4      hWn        W n        V\        VP                  4      3V n        R# )rú   N)	rG   rû   rü   rÿ   ró   rô   ÚnextÚ_timeout_counterÚ	tdeadline)r*   ró   rô   rw  s   &&&&r"   Ú__init__Ú_Timeout.__init__G  sJ   € ô ˜(¤G§L¡L×1Ò1ÜÐ5¸Õ@ÓAÐAØ ŒØ ŒàÜ�×)Ñ)Ó*ð
ˆŽr%   c                ó$   <€ V ^8„  d   QhRRRS[ /# ©r   Úotherru  r   rš   )r    r!   s   "€r"   r#   rx  W  s   ø€ ÷ 0ñ 0˜Jð 0©4ñ 0r%   c                ó4   € V P                   VP                   8  # r'   ©r|  ©r*   r�  s   &&r"   Ú__lt__Ú_Timeout.__lt__W  s   € Ø�~‰~ §¡Ñ/Ð/r%   c                ó$   <€ V ^8„  d   QhRRRS[ /# r€  rš   )r    r!   s   "€r"   r#   rx  Z  s   ø€ ÷ 1ñ 1˜Jð 1©4ñ 1r%   c                ó4   € V P                   VP                   8*  # r'   rƒ  r„  s   &&r"   Ú__le__Ú_Timeout.__le__Z  s   € Ø�~‰~ §¡Ñ0Ð0r%   )rô   ró   r|  N)ró   rô   r|  )r3   r4   r5   r6   ri  Ú	__slots__r}  r…  r‰  r7   r8   r9   s   @r"   ru  ru  A  s-   ø‡ € Ù<ò 6€I÷

ð 

÷ 0ð 0÷1ö 1r%   ru  c                   ó¦   a € ] tR tRt o RtRV 3R lR lltV 3R lR ltV 3R lR ltV 3R	 lR
 ltV 3R lR lt	V 3R lR lt
V 3R lR ltRtV tR# )ÚPeriodicCallbacki^  a  Schedules the given callback to be called periodically.

The callback is called every ``callback_time`` milliseconds when
``callback_time`` is a float. Note that the timeout is given in
milliseconds, while most other time-related functions in Tornado use
seconds. ``callback_time`` may alternatively be given as a
`datetime.timedelta` object.

If ``jitter`` is specified, each callback time will be randomly selected
within a window of ``jitter * callback_time`` milliseconds.
Jitter can be used to reduce alignment of events with similar periods.
A jitter of 0.1 means allowing a 10% variation in callback time.
The window is centered on ``callback_time`` so the total number of calls
within a given interval should not be significantly affected by adding
jitter.

If the callback runs for longer than ``callback_time`` milliseconds,
subsequent invocations will be skipped to get back on schedule.

`start` must be called after the `PeriodicCallback` is created.

.. versionchanged:: 5.0
   The ``io_loop`` argument (deprecated since version 4.1) has been removed.

.. versionchanged:: 5.1
   The ``jitter`` argument is added.

.. versionchanged:: 6.2
   If the ``callback`` argument is a coroutine, and a callback runs for
   longer than ``callback_time``, subsequent invocations will be skipped.
   Previously this was only true for regular functions, not coroutines,
   which were "fire-and-forget" for `PeriodicCallback`.

   The ``callback_time`` argument now accepts `datetime.timedelta` objects,
   in addition to the previous numeric milliseconds.
c                ó~   <€ V ^8„  d   QhRS[ . S[S[,          3,          RS[S[P
                  S[3,          RS[RR/# )r   rô   Úcallback_timeÚjitterr   N)r   r   r   r   rö   r÷   rÇ   )r    r!   s   "€r"   r#   ÚPeriodicCallback.__annotate__„  sR   ø€ ÷ ñ á˜2™x©	Õ2Ð2Õ3ðñ ™X×/Ñ/±Ð6Õ7ðñ ð	ð
 
ñr%   c                óò   € Wn         \        V\        P                  4      '       d%   V\        P                  ! ^R7      ,          V n        MV^ 8:  d   \        R4      hW n        W0n        RV n        RV n        R# )é   )Úmillisecondsz4Periodic callback must have a positive callback_timeFN)	rô   rG   rö   r÷   r�  Ú
ValueErrorr�  Ú_runningÚ_timeout)r*   rô   r�  r�  s   &&&&r"   r}  ÚPeriodicCallback.__init__„  sb   € ð !ŒÜ�m¤X×%7Ñ%7×8Ò8Ø!.´×1CÒ1CÐQRÔ1SÕ!SˆDÕà Ô!Ü Ð!WÓXÐXØ!.ÔØŒØˆŒØˆŽr%   c                ó   <€ V ^8„  d   QhRR/# r/   r(   )r    r!   s   "€r"   r#   r‘  •  s   ø€ ÷ ñ �tñ r%   c                ó¤   € \         P                  4       V n        RV n        V P                  P	                  4       V n        V P                  4        R# )zStarts the timer.TN)r>   rT   rw  r–  rç   Ú_next_timeoutÚ_schedule_nextr)   s   &r"   r¾   ÚPeriodicCallback.start•  s:   € ô
 —~‘~Ó'ˆŒØˆŒØ!Ÿ\™\×.Ñ.Ó0ˆÔØ×ÑÖr%   c                ó   <€ V ^8„  d   QhRR/# r/   r(   )r    r!   s   "€r"   r#   r‘  Ÿ  s   ø€ ÷ !ñ !�dñ !r%   c                óŒ   € RV n         V P                  e/   V P                  P                  V P                  4       RV n        R# R# )zStops the timer.FN)r–  r—  rw  rè   r)   s   &r"   rÂ   ÚPeriodicCallback.stopŸ  s5   € àˆŒØ�=‰=Ò$Ø�L‰L×'Ñ'¨¯©Ô6Ø ˆDŽMñ %r%   c                ó    <€ V ^8„  d   QhRS[ /# r   rš   )r    r!   s   "€r"   r#   r‘  ¦  s   ø€ ÷ ñ ™Dñ r%   c                ó   € V P                   # )zVReturns ``True`` if this `.PeriodicCallback` has been started.

.. versionadded:: 4.1
)r–  r)   s   &r"   Ú
is_runningÚPeriodicCallback.is_running¦  s   € ð
 �}‰}Ðr%   c                ó   <€ V ^8„  d   QhRR/# r/   r(   )r    r!   s   "€r"   r#   r‘  ­  s   ø€ ÷ 
"ñ 
"˜Dñ 
"r%   c              ƒ  óL  "  € V P                   '       g   R #  V P                  4       pVe   \        V4      '       d   VG R j  x€L
  T P                  4        R #  L  \         d'    \        P
                  ! RT P                  RR7        LDi ; i  T P                  4        i ; i5i)NrE  TrF  )r–  rô   r   rÕ   r   rK  rœ  )r*   Úvals   & r"   Ú_runÚPeriodicCallback._run­  s~   é € Ø�}�}ˆ}Ùð	"Ø—-‘-“/ˆCØŠ¤;¨s×#3Ò#3Ø—	�	ð ×ÑÖ!ñ	 øÜô 	TÜ�MŠMÐ4°d·m±mÈd×Sð	Tûð ×ÑÕ!üsF   ‚B$˜*A ÁAÁA ÁB$ÁA Á.BÂ	B ÂBÂB ÂB!Â!B$c                ó   <€ V ^8„  d   QhRR/# r/   r(   )r    r!   s   "€r"   r#   r‘  ¹  s   ø€ ÷ Tñ T ñ Tr%   c                óê   € V P                   '       da   V P                  V P                  P                  4       4       V P                  P	                  V P
                  V P                  4      V n        R # R # r'   )r–  Ú_update_nextrw  rç   ræ   r›  r¨  r—  r)   s   &r"   rœ  ÚPeriodicCallback._schedule_next¹  sM   € Ø�=�=ˆ=Ø×Ñ˜dŸl™l×/Ñ/Ó1Ô2Ø ŸL™L×4Ñ4°T×5GÑ5GÈÏÉÓSˆDŽMñ r%   c                ó$   <€ V ^8„  d   QhRS[ RR/# )r   Úcurrent_timer   Nrï   )r    r!   s   "€r"   r#   r‘  ¾  s   ø€ ÷ 4ñ 4©ð 4°4ñ 4r%   c                óÂ  € V P                   R ,          pV P                  '       d<   V^V P                  \        P                  ! 4       R,
          ,          ,           ,          pV P                  V8:  dU   V ;P                  \        P
                  ! WP                  ,
          V,          4      ^,           V,          ,          un        R# V ;P                  V,          un        R# )g     @�@g      à?N)r�  r�  Úrandomr›  ÚmathÚfloor)r*   r¯  Úcallback_time_secs   && r"   r¬  ÚPeriodicCallback._update_next¾  sž   € Ø ×.Ñ.°Õ7ÐØ�;�;ˆ;à  d§k¡k´V·]²]³_ÀsÕ5JÕ&KÕ!LÕLÐØ×Ñ Ô-ð
 ×ÒÜ—
’
˜L×+=Ñ+=Õ=ÐARÕRÓSÐVWÕWØ!õ#"õ "×ð$ ×ÒÐ"3Õ3×r%   )r›  r–  r—  rô   r�  rw  r�  N)rD   )r3   r4   r5   r6   ri  r}  r¾   rÂ   r£  r¨  rœ  r¬  r7   r8   r9   s   @r"   r�  r�  ^  sS   ø‡ € ñ#÷Jò ÷"ð ÷!ð !÷ð ÷
"ð 
"÷Tð T÷
4ö 4r%   r�  )2ri  rn   Úconcurrent.futuresr,  rö   r"  rû   rX  rÖ   rç   r²  r±  ry   Úinspectr   Útornado.concurrentr   r   r   r   r   Útornado.logr   Útornado.utilr	   r
   r   rã   r   r   r   r   r   r   r   r   rä   r   r   r   r   Útyping_extensionsr   rø   r   r:   r;   r>   ru  r�  r(   r%   r"   Ú<module>r¼     s³   ðñ ó Û Û Û Û Û 	Û 
Û Û Û Û Ý ÷õ õ  ß BÑ Bã ß R× RÓ Rà	××Ðß1Ó1æ*à€Hô�(ô ñ ˆTƒ]€ÙˆT˜Ô%€ôv'ˆ\ô v'÷r1ñ 1÷:|4ó |4r%   