U
vi @ s d dl Z d dlZd dlmZ d dlmZmZmZ d dlm Z mZ d dl
mZmZm
Z
ddlmZ edZed ZG d
d deZdS ) N)Future)ListOptionalTypeVar)abctyping)CompositeDisposable
DisposableSingleAssignmentDisposable )AsyncIOScheduler_TStateZRxc @ s e Zd ZdZdeje ee ej dddZ
dejeje ee ej dddZdej
eje ee ej dd d
Zeddd
ZdS )AsyncIOThreadSafeSchedulerzA scheduler that schedules work via the asyncio mainloop. This is a
subclass of AsyncIOScheduler which uses the threadsafe asyncio methods.
N)actionstatereturnc sL t dd fdd}j|ddfdd}tt|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).
Nr c s j d_d S Nr Z
invoke_actionZ
disposable r sadselfr r i/opt/alt/python38/lib/python3.8/site-packages/reactivex/scheduler/eventloop/asynciothreadsafescheduler.pyinterval( s z5AsyncIOThreadSafeScheduler.schedule.