<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Concurrency on Luther Monson</title>
    <link>https://luth.io/tags/concurrency/</link>
    <description>Recent content in Concurrency on Luther Monson</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Thu, 17 Sep 2026 20:12:00 -0700</lastBuildDate>
    <atom:link href="https://luth.io/tags/concurrency/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>os/exec&#39;s StdoutPipe Footgun: How cmd.Wait() Ate My Last Frame (Twice)</title>
      <link>https://luth.io/blog/2026/09/os-exec-stdoutpipe-wait-footgun/</link>
      <pubDate>Thu, 17 Sep 2026 20:12:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/09/os-exec-stdoutpipe-wait-footgun/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://luth.io/blog/2026/08/shipmates-persona-based-ai-coding-crews/&#34;&gt;shipmates&lt;/a&gt; spends most of its life spawning &lt;code&gt;claude&lt;/code&gt; (and&#xA;&lt;code&gt;codex&lt;/code&gt;) processes and reading newline-delimited JSON off their stdout. The last frame of a turn is the important one.&#xA;It&amp;rsquo;s a &lt;code&gt;result&lt;/code&gt; frame with the cost, the model and the final text. Stderr matters too, because that&amp;rsquo;s where Claude Code&#xA;tells you &lt;code&gt;Invalid API key · Please run /login&lt;/code&gt;. For a while I was throwing both away under load. The cause is&#xA;documented right there in the &lt;code&gt;os/exec&lt;/code&gt; godoc. I fixed it in one package and then found the exact same bug again a&#xA;month later in another.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Stop Running PHP on tokio&#39;s spawn_blocking - Own Your Thread Pool</title>
      <link>https://luth.io/blog/2026/09/own-your-php-thread-pool/</link>
      <pubDate>Fri, 04 Sep 2026 20:30:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/09/own-your-php-thread-pool/</guid>
      <description>&lt;p&gt;For most of its life, &lt;a href=&#34;https://github.com/ephpm/ephpm&#34;&gt;ePHPm&lt;/a&gt; ran every PHP request on tokio&amp;rsquo;s &lt;code&gt;spawn_blocking&lt;/code&gt;&#xA;pool. It works. It passes tests and it serves benchmarks fine. It&amp;rsquo;s the first thing anybody reaches for when they need&#xA;to call blocking code from async Rust. It&amp;rsquo;s also quietly wrong for a language runtime. The problems only show up under&#xA;overload or after a crash. Over the last three weeks it got replaced with a pool of OS threads that ePHPm owns. That&#xA;pool shipped first behind a config flag, then as the default. As of v0.9.0 the &lt;code&gt;spawn_blocking&lt;/code&gt; engine is gone.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Two Small go-proxmox Fixes: A Watch Channel That Never Closed, and WithRetry</title>
      <link>https://luth.io/blog/2026/07/go-proxmox-watch-close-withretry/</link>
      <pubDate>Sat, 11 Jul 2026 17:26:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/07/go-proxmox-watch-close-withretry/</guid>
      <description>&lt;p&gt;Here are two changes from the v0.5 to v0.7 stretch of &lt;a href=&#34;https://github.com/luthermonson/go-proxmox&#34;&gt;go-proxmox&lt;/a&gt;. They&amp;rsquo;re&#xA;too small for a post each. They&amp;rsquo;re worth knowing about if you write long-running tooling against Proxmox. One is a bug&#xA;in code I wrote about in 2022. The other is a feature that replaces a retry loop everybody was writing for themselves.&lt;/p&gt;&#xA;&lt;h3 id=&#34;the-channel-that-only-closed-when-things-went-well&#34;&gt;The channel that only closed when things went well&lt;/h3&gt;&#xA;&lt;p&gt;In 2022 I wrote up &lt;a href=&#34;https://luth.io/blog/2022/03/proxmox-tasks-upid-wait-go/&#34;&gt;how tasks and &lt;code&gt;Watch&lt;/code&gt; work&lt;/a&gt;. &lt;code&gt;Watch&lt;/code&gt; returns a channel of&#xA;log lines. A goroutine tails the task log until the task stops. Then it closes the channel so you can &lt;code&gt;range&lt;/code&gt; over it.&#xA;Here is the tail loop from that post:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
