<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Errgroup on Nalar</title>
    <link>https://nalar.dev/tags/errgroup/</link>
    <description>Recent content in Errgroup on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 16 Sep 2026 00:00:00 +0700</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/errgroup/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Go errgroup SetLimit Blocks Submitters at the Concurrency Cap</title>
      <link>https://nalar.dev/go-errgroup-setlimit-blocks-submitters-at-concurrency-cap/</link>
      <pubDate>Wed, 16 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/go-errgroup-setlimit-blocks-submitters-at-concurrency-cap/</guid>
      <description>&lt;p&gt;&lt;code&gt;errgroup.Group.SetLimit&lt;/code&gt; can block the goroutine that calls &lt;code&gt;Group.Go&lt;/code&gt;. The limit is enforced before a new worker goroutine starts, so a full group applies backpressure at task submission rather than building an internal queue.&lt;/p&gt;&#xA;&lt;p&gt;That behavior matters when submission is part of another control path. A loop that appears to launch work asynchronously can itself stop at &lt;code&gt;g.Go(...)&lt;/code&gt; until one active function returns.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-limit-sits-on-admission&#34;&gt;The limit sits on admission&lt;/h2&gt;&#xA;&lt;p&gt;A zero-value &lt;code&gt;errgroup.Group&lt;/code&gt; has no concurrency limit. After &lt;code&gt;SetLimit(n)&lt;/code&gt;, at most &lt;code&gt;n&lt;/code&gt; functions started by &lt;code&gt;Go&lt;/code&gt; are active at once. A negative limit restores unlimited admission, while a zero limit prevents every later &lt;code&gt;Go&lt;/code&gt; call from starting a function.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
