<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Micro-Batching on Jasper</title><link>https://jasper-aa64.github.io/zh/tags/micro-batching/</link><description>Recent content in Micro-Batching on Jasper</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Sun, 20 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://jasper-aa64.github.io/zh/tags/micro-batching/index.xml" rel="self" type="application/rss+xml"/><item><title>交易系统笔记 #4：无锁队列与 Micro-Batching</title><link>https://jasper-aa64.github.io/zh/posts/lock-free-queue-logger-micro-batching/</link><pubDate>Sun, 20 Sep 2026 00:00:00 +0000</pubDate><guid>https://jasper-aa64.github.io/zh/posts/lock-free-queue-logger-micro-batching/</guid><description>无锁 SPSC 队列成立，是因为每个共享变量只有一个写者：每一边只写自己的下标，只读对方的。剩下的工作是别让这个性质被悄悄破坏：元素个数用两个下标相减而不是共享计数器，对方的下标缓存一份、只在看起来满了或空了时才刷新，日志按文本段推而不是按字符推。SPSC 只在“失败就返回”的接口下才是 wait-free，有界队列满了总得在丢弃和阻塞之间选一个。</description></item></channel></rss>