Hacked By AnonymousFox
�
c��f� � � � d Z ddlZddlZddlZddlZddlZddlZddlmZ ddlm Z ddlm
Z
ddlmZ G d� d ej � � Z
G d
� d� � Zdd�d
�Zd� ZdS ))�Runner�run� N� )�
coroutines)�events)�
exceptions)�tasksc � � e Zd ZdZdZdZdS )�_State�created�initialized�closedN)�__name__�
__module__�__qualname__�CREATED�INITIALIZED�CLOSED� � �6/opt/alt/python311/lib64/python3.11/asyncio/runners.pyr r s � � � � � ��G��K�
�F�F�Fr r c �P � e Zd ZdZddd�d�Zd� Zd� Zd� Zd� Zdd �d
�Z d� Z
d� ZdS )
r a5 A context manager that controls event loop life cycle.
The context manager always creates a new event loop,
allows to run async functions inside it,
and properly finalizes the loop at the context manager exit.
If debug is True, the event loop will be run in debug mode.
If loop_factory is passed, it is used for new event loop creation.
asyncio.run(main(), debug=True)
is a shortcut for
with asyncio.Runner(debug=True) as runner:
runner.run(main())
The run() method can be called multiple times within the runner's context.
This can be useful for interactive console (e.g. IPython),
unittest runners, console tools, -- everywhere when async code
is called from existing sync framework and where the preferred single
asyncio.run() call doesn't work.
N)�debug�loop_factoryc �| � t j | _ || _ || _ d | _ d | _ d| _ d| _ d S )Nr F) r r �_state�_debug�
_loop_factory�_loop�_context�_interrupt_count�_set_event_loop)�selfr r s r �__init__zRunner.__init__1 s>