<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Barrier on cassiobotaro</title><link>https://cassiobotaro.dev/en/tags/barrier/</link><description>Recent content in Barrier on cassiobotaro</description><generator>Hugo</generator><language>en</language><lastBuildDate>Thu, 29 Oct 2026 13:15:29 -0300</lastBuildDate><atom:link href="https://cassiobotaro.dev/en/tags/barrier/index.xml" rel="self" type="application/rss+xml"/><item><title>Go Concurrency - Barrier</title><link>https://cassiobotaro.dev/en/posts/go-concurrency-barrier/</link><pubDate>Wed, 18 Nov 2026 00:00:00 -0300</pubDate><guid>https://cassiobotaro.dev/en/posts/go-concurrency-barrier/</guid><description>&lt;video
 src="https://cassiobotaro.dev/videos/barreira.mp4"
 title="Four goroutines reaching a barrier and going through together" aria-label="Four goroutines reaching a barrier and going through together"
 autoplay
 loop
 muted
 playsinline
 controls
 preload="metadata"
 style="width: 100%; height: auto;"&gt;
&lt;/video&gt;

&lt;p&gt;In the &lt;a href="https://cassiobotaro.dev/en/posts/go-concurrency-fan-out/" &gt;fan-out&lt;/a&gt; &lt;code&gt;main&lt;/code&gt; waited for the workers with a &lt;code&gt;wg.Wait()&lt;/code&gt;. One waiting, several being waited on.&lt;/p&gt;
&lt;p&gt;But what about when all of them need to wait for each other? Four goroutines load data in parallel, and none can start computing before all of them finish loading.&lt;/p&gt;</description></item></channel></rss>