<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
      <title>Mauro Pinto - concurrency</title>
      <link>https://pintomau.dev</link>
      <description>Software and stuff</description>
      <generator>Zola</generator>
      <language>en</language>
      <atom:link href="https://pintomau.dev/tags/concurrency/rss.xml" rel="self" type="application/rss+xml"/>
      <lastBuildDate>Tue, 30 Jun 2026 00:00:00 +0000</lastBuildDate>
      <item>
          <title>go-spmc-ring</title>
          <pubDate>Tue, 30 Jun 2026 00:00:00 +0000</pubDate>
          <author>Mauro Pinto</author>
          <link>https://pintomau.dev/projects/go-spmc-ring/</link>
          <guid>https://pintomau.dev/projects/go-spmc-ring/</guid>
          <description xml:base="https://pintomau.dev/projects/go-spmc-ring/">&lt;p&gt;A single-writer, multiple-reader (SPMC) ring buffer in Go, inspired by the LMAX Disruptor pattern. It focuses on
cache-line awareness, false-sharing avoidance, and lock-free reader lifecycle management: &lt;strong&gt;unlike the classic
Disruptor (where the consumer graph is wired once before the first event) readers here join and leave a
live stream at runtime without locks, allocations, or writer stalls.&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;This is useful for runtimes and actor model-like systems where you need some entering and reentering readers.&lt;&#x2F;p&gt;
&lt;p&gt;We also preview the compatibility and usage with the preview SIMD package in Go 1.26, which allows for vectorized
operations on the ring buffer.&lt;&#x2F;p&gt;
&lt;p&gt;On a Ryzen 5 9600X (Linux, Go 1.26) a single publish takes ~5.2 ns (≈193 M ops&#x2F;s), batched publishes reach ~2.1 ns&#x2F;item
(≈476 M items&#x2F;s), and eight concurrent readers cost the writer less than 7%.&lt;&#x2F;p&gt;
&lt;p&gt;Check the &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;pintomau&#x2F;go-spmc-ring&quot;&gt;repo&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</description>
      </item>
    </channel>
</rss>
