HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib64/python3.6/site-packages/zmq/eventloop/__pycache__/_deprecated.cpython-36.opt-1.pyc
3

VS�_��@sdZddlmZmZmZddlZddlZddlZddlm	Z	m
Z
mZmZm
Z
mZyddlZejZWneefk
r~fZYnXddlmZmZddlmZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�Zdeko�dknr�ddd�Zee_eZdd�Z dS)uXtornado IOLoop API with zmq compatibility

If you have tornado ≥ 3.0, this is a subclass of tornado's IOLoop,
otherwise we ship a minimal subset of tornado in zmq.eventloop.minitornado.

The minimal shipped version of tornado's IOLoop does not include
support for concurrent futures - this will only be available if you
have tornado ≥ 3.0.
�)�absolute_import�division�with_statementN)�Poller�POLLIN�POLLOUT�POLLERR�ZMQError�ETERM�)�
PollIOLoop�PeriodicCallback)�gen_logcs2eZdZdZd	�fdd�	Zdd�Zdd�Z�ZS)
�DelayedCallbackz�Schedules the given callback to be called once.

    The callback is called once, after callback_time milliseconds.

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

    The timeout is calculated from when `start` is called.
    Ncs.tjdt�t|d�}tt|�j|||�dS)NzDDelayedCallback is deprecated.
        Use loop.add_timeout instead.g����MbP?)�warnings�warn�DeprecationWarning�max�superr�__init__)�self�callback�
callback_time�io_loop)�	__class__��#/usr/lib64/python3.6/_deprecated.pyr.s
zDelayedCallback.__init__cCs6d|_d|_tj�|jd|_|jj|j|j�dS)zStarts the timer.Tg@�@N)�_runningZ	_firstrun�timerZ
_next_timeoutrZadd_timeout�_run)rrrr�start5szDelayedCallback.startcCsD|js
dSd|_y|j�Wn"tk
r>tjddd�YnXdS)NFzError in delayed callbackT)�exc_info)rr�	Exceptionr�error)rrrrr<szDelayedCallback._run)N)�__name__�
__module__�__qualname__�__doc__rr r�
__classcell__rr)rrr%src@sXeZdZdZdd�Zedd��Zedd��Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�ZdS)�	ZMQPollerz�A poller that can be used in the tornado IOLoop.
    
    This simply wraps a regular zmq.Poller, scaling the timeout
    by 1000, so that it is in seconds rather than milliseconds.
    cCst�|_dS)N)r�_poller)rrrrrLszZMQPoller.__init__cCs>d}|tj@r|tO}|tj@r(|tO}|tj@r:|tO}|S)zEtranslate IOLoop.READ/WRITE/ERROR event masks into zmq.POLLIN/OUT/ERRr)�IOLoop�READr�WRITEr�ERRORr)�events�z_eventsrrr�_map_eventsOs


zZMQPoller._map_eventscCs>d}|t@r|tjO}|t@r(|tjO}|t@r:|tjO}|S)zEtranslate zmq.POLLIN/OUT/ERR event masks into IOLoop.READ/WRITE/ERRORr)rr+r,rr-rr.)r0r/rrr�
_remap_events[s


zZMQPoller._remap_eventscCs|jj||j|��S)N)r*�registerr1)r�fdr/rrrr3gszZMQPoller.registercCs|jj||j|��S)N)r*�modifyr1)rr4r/rrrr5jszZMQPoller.modifycCs|jj|�S)N)r*�
unregister)rr4rrrr6mszZMQPoller.unregistercs"�jjd|�}�fdd�|D�S)zopoll in seconds rather than milliseconds.
        
        Event masks will be IOLoop.READ/WRITE/ERROR
        i�csg|]\}}|�j|�f�qSr)r2)�.0r4Zevt)rrr�
<listcomp>vsz"ZMQPoller.poll.<locals>.<listcomp>)r*�poll)rZtimeoutr0r)rrr9pszZMQPoller.pollcCsdS)Nr)rrrr�closexszZMQPoller.closeN)
r$r%r&r'r�staticmethodr1r2r3r5r6r9r:rrrrr)Esr)csJeZdZdZeZd�fdd�	Zedd��Zedd��Z	�fd	d
�Z
�ZS)�	ZMQIOLoopzjZMQ subclass of tornado's IOLoop
    
    Minor modifications, so that .current/.instance return self
    Ncs2|dkr|j�n|}tt|�jfd|i|��dS)N�impl)�	_zmq_implrr<�
initialize)rr=�kwargs)rrrr?�szZMQIOLoop.initializecOsDtdkrtj|�tj||�}t||�s@tjd||ftdd�|S)a
Returns a global `IOLoop` instance.
        
        Most applications have a single, global `IOLoop` running on the
        main thread.  Use this method to get this instance from
        another thread.  To get the current thread's `IOLoop`, use `current()`.
        �z.IOLoop.current expected instance of %r, got %r�)�
stacklevel)rA)�tornado_versionr�	configure�instance�
isinstancerr�RuntimeWarning)�cls�argsr@�looprrrrF�s



zZMQIOLoop.instancecOsDtdkrtj|�tj||�}t||�s@tjd||ftdd�|S)u/Returns the current thread’s IOLoop.
        rAz.IOLoop.current expected instance of %r, got %rrB)rC)rA)rDrrE�currentrGrrrH)rIrJr@rKrrrrL�s


zZMQIOLoop.currentcsHytt|�j�Wn0tk
rB}z|jtkr0n�WYdd}~XnXdS)N)rr<r r	�errnor
)r�e)rrrr �s
zZMQIOLoop.start)N)r$r%r&r'r)r>r?�classmethodrFrLr r(rr)rrr<|sr<rAFcCsddlm}|jj|�|�S)zBbackport IOLoop.close to 3.0 from 3.1 (supports fd.close() method)r)r)Z zmq.eventloop.minitornado.iolooprr:�__get__)rZall_fdsZ	mini_looprrr�backport_close�srQcCs2ddlm}tdkr"|jjt�ntj�|j_dS)a4set the tornado IOLoop instance with the pyzmq IOLoop.
    
    After calling this function, tornado's IOLoop.instance() and pyzmq's
    IOLoop.instance() will return the same object.
    
    An assertion error will be raised if tornado's IOLoop has been initialized
    prior to calling this function.
    r)�iolooprAN)rA)�tornadorRrDr+rEr<rFZ	_instance)rRrrr�install�s	rT)rAr)rAr)F)!r'Z
__future__rrr�osrrZzmqrrrrr	r
rS�version_inforD�ImportError�AttributeErrorZminitornado.iolooprr
Zminitornado.logrr�objectr)r<rQr:r+rTrrrr�<module>
s( 

 79