G
G
Grandma Luda2021-10-03 19:25:59
Python
Grandma Luda, 2021-10-03 19:25:59

Why are get_running_loop() and set_event_loop() needed in asyncio?

Sorry for the stupid question, but I couldn't find a clear explanation with an example

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2021-10-03
@KirasiH

And what can be incomprehensible here? get_running_loopreturns an event loop that can be used later, but set_event_loopallows you to set the event loop on a new thread to reuse it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question