<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Asyncio on Chen Kai Blog</title><link>https://www.chenk.top/en/tags/asyncio/</link><description>Recent content in Asyncio on Chen Kai Blog</description><generator>Hugo</generator><language>en</language><lastBuildDate>Thu, 21 Apr 2022 09:00:00 +0000</lastBuildDate><atom:link href="https://www.chenk.top/en/tags/asyncio/index.xml" rel="self" type="application/rss+xml"/><item><title>Python Engineering (6): Concurrency — Threads, Processes, and asyncio</title><link>https://www.chenk.top/en/python-engineering/06-concurrency/</link><pubDate>Thu, 21 Apr 2022 09:00:00 +0000</pubDate><guid>https://www.chenk.top/en/python-engineering/06-concurrency/</guid><description>&lt;p>Your script downloads 100 files one at a time. Each download takes 2 seconds, mostly waiting for the server to respond. Total time: 200 seconds. Your CPU is idle for 99% of that time, wasting compute and money on network latency. Concurrency can fix this.&lt;/p>
&lt;p>Python has three concurrency models, each designed for different problems. Choosing the wrong one can make your code slow or full of race conditions. This article explains when to use each.&lt;/p></description></item></channel></rss>