The Secret Life of Python: Introduction to Asyncio
The Secret Life of Python: Introduction to Asyncio A practical guide to coroutines, the event loop, and cooperative multitasking #Python #Asyncio #AsyncAwait #ConcurrentProgramming Margaret is a senior software engineer. Timothy is her junior colleague. They work in a grand Victorian library in London — the kind of place where code quality is the unspoken objective, and craftsmanship is the only thing that matters. Episode 40 Timothy was looking at his Chess Club server. It was popular—so popular that he now had 5,000 players trying to connect at once to check their match rankings. "I tried using Threads," Timothy told Margaret, "but with 5,000 threads, my laptop started screaming. Then I tried Processes, but my memory ran out after just a few dozen. How am I supposed to handle thousands of people at once if I can't afford the 'workers' to watch them?" Margaret stood up and picked up three tennis balls. She started to juggle. "You’ve been tr...