concurrency with asyncio multitasking these cooperating tasks operate asynchronouslyby this we mean that the tasksare able to operate separately from other tasksare able to wait for another task to return result when requiredand are thus able to allow other tasks to run while they are waiting the io (input/outputaspect of the name async io is because this form of concurrent program is best suited to / bound tasks in an / bound task program spends most of its time sending data toor reading data fromsome form of external device (for example database or set of files etc this communication is time consuming and means that the program spends most of its time waiting for response from the external device one way in which such / bound applications can (appear tospeed up is to overlap the execution of different tasksthuswhile one task is waiting for database to respond with some dataanother task can be writing data to log file etc async io event loop when you are developing code using the async io facilities you do not need to worry about how the internals of the async io library workhowever at least at the conceptual level it is useful to understand one key conceptthat of the async io event loopthis loop controls how and when each task gets run for the purposes of this discussion task represents some work that can be run independently of other pieces of work the event loop knows about each task to be run and what the state of the task currently is (for example whether it is waiting for something to happen/completeit selects task that is ready to run from the list of available tasks and executes it this task has complete control of the cpu until it either completes its work or hands back control to the event loop (for examplebecause it must now wait for some data to be supplied from databasethe event loop now checks to see if any of the waiting tasks are ready to continue executing and makes note of their status the event loop then selects another task that is ready to run and starts that task off this loop continues until all the tasks have finished this is illustrated below