<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Worker on cassiobotaro</title><link>https://cassiobotaro.dev/en/tags/worker/</link><description>Recent content in Worker on cassiobotaro</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 05 Oct 2026 22:04:50 -0300</lastBuildDate><atom:link href="https://cassiobotaro.dev/en/tags/worker/index.xml" rel="self" type="application/rss+xml"/><item><title>Go Concurrency - Worker</title><link>https://cassiobotaro.dev/en/posts/go-concurrency-worker/</link><pubDate>Tue, 06 Oct 2026 00:00:00 +0000</pubDate><guid>https://cassiobotaro.dev/en/posts/go-concurrency-worker/</guid><description>&lt;video
 src="https://cassiobotaro.dev/videos/trabalhador.mp4"
 title="A goroutine consuming values from a channel" aria-label="A goroutine consuming values from a channel"
 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-generators/" &gt;generator&lt;/a&gt; a goroutine wrote to the channel and &lt;code&gt;main&lt;/code&gt; read from it.&lt;/p&gt;
&lt;p&gt;Now the roles flip. The one reading is the goroutine.&lt;/p&gt;
&lt;h2 id="what-a-worker-is"&gt;
 What a worker is
 &lt;a class="heading-link" href="#what-a-worker-is"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;A worker is a goroutine that receives values from a channel and processes them until the channel is closed.&lt;/p&gt;</description></item></channel></rss>