<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Python 异步与并发 on dextermayhewjd</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/</link><description>Recent content in Python 异步与并发 on dextermayhewjd</description><generator>Hugo</generator><language>zh-cn</language><atom:link href="https://dextermayhewjd.github.io/projects/python-async-concurrency/index.xml" rel="self" type="application/rss+xml"/><item><title>01 · async def：定义之后，什么时候执行？</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/01-async-def/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/01-async-def/</guid><description>先分清异步函数、协程对象和真正执行的函数体。</description></item><item><title>02 · await：等待结果，不等于自动并发</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/02-await/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/02-await/</guid><description>沿执行顺序理解挂起、恢复和 asyncio.sleep。</description></item><item><title>03 · Task 与 gather：把多份工作安排起来</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/03-tasks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/03-tasks/</guid><description>看清创建任务、保留引用和等待整组结果三个动作。</description></item><item><title>04 · wait 与 as_completed：先处理已经完成的工作</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/04-results/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/04-results/</guid><description>先用已知的任务和 sleep 理解 wait，再学习按完成顺序取得结果。</description></item><item><title>05 · 取消与超时：请求停止以后，还要等待收尾</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/05-cancellation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/05-cancellation/</guid><description>理解 cancel、CancelledError、finally 和任务级超时。</description></item><item><title>06 · Semaphore：限制同时进入的工作数量</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/06-semaphore/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/06-semaphore/</guid><description>把并发许可与任务总量区分开。</description></item><item><title>07 · Queue：把生产速度和消费速度接起来</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/07-queues/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/07-queues/</guid><description>用有界队列理解等待、背压与结束信号。</description></item><item><title>08 · 线程池：把阻塞工作移出事件循环</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/08-executors/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/08-executors/</guid><description>理解 to_thread、run_in_executor 与两类 Future 的边界。</description></item><item><title>09 · Lock、Event 与线程退出</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/09-thread-synchronization/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/09-thread-synchronization/</guid><description>线程共享状态怎样保护，后台线程怎样收到停止信号。</description></item><item><title>10 · async with、async for 与异步生成器</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/10-async-protocols/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/10-async-protocols/</guid><description>把异步资源的进入、迭代和退出连起来。</description></item><item><title>11 · ContextVar：让并发任务保留各自的上下文</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/11-contextvars/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/11-contextvars/</guid><description>区分任务上下文与共享全局变量，并恢复进入前的状态。</description></item><item><title>12 · 进程池、子进程与系统边界</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/12-processes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/12-processes/</guid><description>从 spawn 和 Pool.starmap 出发，区分进程、线程与 asyncio。</description></item><item><title>13 · Future、回调与跨线程事件循环</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/13-event-loop/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/13-event-loop/</guid><description>从待完成结果走到事件循环的启动、跨线程提交与收尾。</description></item><item><title>14 · 回到 Slime：串起创建、等待与清理</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/14-slime-walkthrough/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/14-slime-walkthrough/</guid><description>用一条完整任务主线检查前面学过的原生机制。</description></item><item><title>15 · Event 通知与异步互斥</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/15-async-notification/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/15-async-notification/</guid><description>从已知任务等待通知开始，理解 Event 的布尔标志，以及 Lock 保护共享状态的边界。</description></item><item><title>16 · Condition、RLock 与 Timer</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/16-thread-coordination/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/16-thread-coordination/</guid><description>线程怎样等待共享状态变化，为什么醒来后还要检查，重入锁和计时线程分别解决什么问题。</description></item><item><title>17 · 线程池 Future 的结果与退出</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/17-executor-results/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/17-executor-results/</guid><description>沿提交、排队、完成和关闭理解线程池，区分同步 Future 与 asyncio 的等待。</description></item><item><title>18 · 进程生命周期：从队列工作到超时回收</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/18-process-lifecycle/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/18-process-lifecycle/</guid><description>沿 Slime 的生成器、服务进程和命令解释器，分清完成消息、进程退出与资源回收。</description></item><item><title>19 · 信号、进程组与文件锁：退出以后谁释放资源？</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/19-signals-locks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/19-signals-locks/</guid><description>从 Slime 的 checkpoint 所有权和 GPU 命令包装器，理解文件锁、信号和进程组清理。</description></item><item><title>20 · asyncio Streams：接收、分帧与连接收尾</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/20-async-streams/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/20-async-streams/</guid><description>跟随 Slime 的本地测试服务器，区分读取语义、写入背压和服务关闭。</description></item><item><title>21 · 异步能力检查与协议边界</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/21-async-inspection/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/21-async-inspection/</guid><description>区分函数、返回对象、类型注解和语法协议，读懂 Slime 的同步/异步扩展点。</description></item><item><title>源码用法与教程对照</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/coverage/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/coverage/</guid><description>每种原生机制对应讲解，每个扫描位置可回到完整源码。</description></item><item><title>版本与参考</title><link>https://dextermayhewjd.github.io/projects/python-async-concurrency/references/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dextermayhewjd.github.io/projects/python-async-concurrency/references/</guid><description>区分语言实验、Slime 原始源码与书籍依据。</description></item></channel></rss>