Your IP : 3.129.195.82
�
�Q�f� � � � d Z ddlZddlZddlZddlZddlZddlmZ ddlmZ ddlm Z ddlm
Z
ddlmZ G d � d
ej � Z
G d� d� Zddd
�d�Zd� Zy))�Runner�run� N� )�
coroutines)�events)�
exceptions)�tasks)� constantsc � � e Zd ZdZdZdZy)�_State�created�initialized�closedN)�__name__�
__module__�__qualname__�CREATED�INITIALIZED�CLOSED� � �6/opt/alt/python312/lib64/python3.12/asyncio/runners.pyr r s � ��G��K�
�Fr r c �N � e Zd ZdZddd�d�Zd� Zd� Zd� Zd� Zdd �d
�Z d� Z
d� Zy)
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| _ y )Nr F) r r �_state�_debug�
_loop_factory�_loop�_context�_interrupt_count�_set_event_loop)�selfr r s r �__init__zRunner.__init__0 s: � ��n�n������)�����
���
� !���$��r c �&