Python Coroutine Asyncio
·845 words·4 mins
Before the advent of asyncio,
when a Python program had many tasks that needed to be executed concurrently,
and wanted to improve program performance,
the only options were multiprocessing or threading.
After Python 3.4, asyncio became another option.
asyncio can be used to write coroutines,
and execute coroutines concurrently using an event loop,
reducing unnecessary waiting time in the program to improve performance.