Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/zmq/eventloop/__pycache__/ioloop.cpython-39.pyc
Ðазад
a a�h' � @ s0 d Z ddlmZmZmZ ddlZddlZzDddlZddlm Z ddlm Z ee jd�sje deedd � ��W n* e y� d dlm Z d dlm Z Y n0 e jZG dd� de�Zd d� Zde_de jv r�d dlmZ ne jZe�� eur�e�� Zq�G dd� de�ZeZdd� Zde jv �r,d dlmZmZmZ dS )z�tornado IOLoop API with zmq compatibility This module is deprecated in pyzmq 17. To use zmq with tornado, eventloop integration is no longer required and tornado itself should be used. � )�absolute_import�division�with_statementN)�gen_log)�ioloop�configurable_defaultzTornado too old: %s�version�unknown� c s2 e Zd ZdZd � 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. Nc s. t �dt� t|d�}tt| ��|||� d S )NzDDelayedCallback is deprecated. Use loop.add_timeout instead.g����MbP?)�warnings�warn�DeprecationWarning�max�superr �__init__)�self�callback� callback_time�io_loop�� __class__� ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/zmq/eventloop/ioloop.pyr ( s � zDelayedCallback.__init__c C s6 d| _ d| _t�� | jd | _| j�| j| j� dS )zStarts the timer.Tg @�@N)�_runningZ _firstrun�timer Z _next_timeoutr Zadd_timeout�_run�r r r r �start/ s zDelayedCallback.startc C sB | j s d S d| _ z| �� W n ty< tjddd� Y n0 d S )NFzError in delayed callbackT)�exc_info)r r � Exceptionr �errorr r r r r 6 s zDelayedCallback._run)N)�__name__� __module__�__qualname__�__doc__r r r � __classcell__r r r r r s r c C s$ t jr d S dt _tjdtdd� d S )NTzlzmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops.� )� stacklevel)�_deprecated�calledr r r r r r r r) ? s �r) Fz .minitornado.)� ZMQIOLoopc s8 e Zd ZdZ� fdd�Zedd� �Zedd� �Z� ZS )r+ z�DEPRECATED: No longer needed as of pyzmq-17 PyZMQ tornado integration now works with the default :mod:`tornado.ioloop.IOLoop`. c s t � tt| ��� S )N)r) r r+ r )r �args�kwargsr r r r X s zZMQIOLoop.__init__c O s( t j�| � t� t jj|i |��}|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()`. )r �IOLoop� configurer) �instance��clsr, r- �loopr r r r0 ] s zZMQIOLoop.instancec O s( t j�| � t� t jj|i |��}|S )u/ Returns the current thread’s IOLoop. )r r. r/ r) �currentr1 r r r r4 l s zZMQIOLoop.current) r"