Robots Atlas>ROBOTS ATLAS

Python — From Basics to Advanced · Asyncio and Concurrent Programming

asyncio.run and the Event Loop

Asyncio and Concurrent Programming

Introduction

asyncio.run() is your entry point to the async world — it creates a new event loop, runs a coroutine in it until completion, and then closes the loop. It is the main function in async scripts. The event loop is the engine scheduling coroutines, callbacks, and I/O operations in a single thread.