import asyncio: Learn Python's AsyncIO #1 - The Async Ecosystem

EdgeDB · 125K views · 2020 · 49:33

Open on YouTube

Python, Ruby & scripting languagesSoftware architecture & designtutorial

Why Stack Overflow recommends it

Stack Overflow users link it when someone needs to understand how asyncio and the event loop actually work before debugging their async code.

Recommended by 2 people across 2 different months, 2020 to 2025.

What it is

The first episode of a multi-part series introducing Python's AsyncIO to programmers who have not used it. It gives a high-level tour of the async ecosystem: why async code matters, latency and user experience, concurrency versus parallelism, thread problems in Python, select, and the history that led to asyncio. Presented by Yury Selivanov for the EdgeDB channel.

What people said

Recommends Shakeel · 2020-07 · Stack Overflow · on “ERROR:root:Error in xyz There is no current event loop in thread 'Thread-7'”

You must probably go through once asyncio usage and its main heart event loop understanding. Similar issue [LINK] which might help you to understand. Here is the tutorial [this video] with some good explanation Just give some flow for how use coroutine with normal Flask app here is the sample one. import asyncio import datetime from flask import Flask, jsonify, request app = Flask(__name__) def print_now(): print(datetime.datetime.now()) async def keep_printing(name: str="") -> None: print(name, end=" ") print_now() await asyncio.sleep(1.50) async def main(num_times): result = await asyncio.gather( keep_printing("first"), keep_printing("second"), keep_printing("third"), ) return result def execut

Recommends Katz · 2025-11 · Stack Overflow · on “How does asyncio actually work?”

just wanted to add anather helpful resource to understand this : link [this video] its a series explainining how asyncio works from one of the python release managers. The response here is great too, both helped me.

Cites Thingamabobs · 2022-08 · Stack Overflow · on “awaiting on future object internals”

First of all, I dont feel qualified to answer your question and I do hope someone with more knowledge will get in touch with this topic. But since there are no other answers yet, I'll try my best to serve a qualified answer to this interesting topic. A Future object is an awaitable Object [LINK] . Awaitable Objects schedule themselves mostly as Tasks i.e due asyncio.gather [LINK] ; wait_for [LINK] or wait [LINK] . The Future object [LINK] however is the lower level parent of Task object [LINK] . The key differences between Task and Future are that: Coroutines can await on Future objects until they either have a result or an exception set, or until they are cancelled. and Tasks are used to ru