<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Asyncio - 标签 - 研发日志 · R&amp;D Log</title><link>https://rd163.visword.com/tags/asyncio/</link><description>Asyncio - 标签 - 研发日志 · R&amp;D Log</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><managingEditor>whutluohui@gmail.com (小智晖)</managingEditor><webMaster>whutluohui@gmail.com (小智晖)</webMaster><copyright>本作品采用知识共享署名-非商业性使用 4.0 国际许可协议进行许可。</copyright><lastBuildDate>Sun, 07 Sep 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://rd163.visword.com/tags/asyncio/" rel="self" type="application/rss+xml"/><item><title>Python asyncio 的事件循环机制</title><link>https://rd163.visword.com/posts/python-asyncio-event-loop/</link><pubDate>Sun, 07 Sep 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/python-asyncio-event-loop/</guid><description>&lt;p>在使用 Python 的 asyncio 库实现异步编程时，协程（coroutine）与事件循环（event loop）这两个概念总是形影不离：协程只声明了「怎么挂起、怎么恢复」,而真正驱动这些协程不断推进的「调度器」,就是事件循环。理解事件循环的角色，是写出正确的异步代码、以及做性能选型（比如要不要换 uvloop）的前提。&lt;/p></description></item><item><title>Python 协程简介</title><link>https://rd163.visword.com/posts/python-corouting-intro/</link><pubDate>Sun, 13 Apr 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/python-corouting-intro/</guid><description><![CDATA[<p>Python 在 3.5 版本中引入了协程相关的语法糖 <code>async</code> 和 <code>await</code>，在 Python 3.7 版本中又提供了 <code>asyncio.run()</code> 来运行一个协程。因此建议大家学习协程时直接使用 Python 3.7 及以上版本。</p>
<p>Python 官方提供了各版本的 asyncio 文档，详见<a href="https://docs.python.org/zh-cn/3.13/library/asyncio-task.html" target="_blank" rel="noopener noreferrer">协程与任务官方文档</a>。</p>]]></description></item></channel></rss>