<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Concurrency on Moises Vega</title><link>https://mvega.dev/tags/concurrency/</link><description>Recent content in Concurrency on Moises Vega</description><generator>Hugo</generator><language>en-us</language><copyright>Moises Vega</copyright><lastBuildDate>Sun, 16 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://mvega.dev/tags/concurrency/index.xml" rel="self" type="application/rss+xml"/><item><title>Testing Concurrent Go with synctest</title><link>https://mvega.dev/posts/synctest-concurrent-testing/</link><pubDate>Sun, 16 Aug 2026 00:00:00 +0000</pubDate><guid>https://mvega.dev/posts/synctest-concurrent-testing/</guid><description>&lt;p&gt;Notes from Alexander Baygeldin&amp;rsquo;s GopherCon 2026 talk, &amp;ldquo;(Sync)testing
Concurrent Code with Confidence.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Testing concurrent code used to mean picking one of three bad options:
hacky (poke at internals), flaky (&lt;code&gt;time.Sleep(100 * time.Millisecond)&lt;/code&gt;
and hope), or slow (sleep long enough that it&amp;rsquo;s reliable). &lt;code&gt;testing/synctest&lt;/code&gt;
removes the tradeoff by giving the test a fake clock.&lt;/p&gt;
&lt;h2 id="the-fake-clock"&gt;The fake clock&lt;/h2&gt;
&lt;p&gt;Inside &lt;code&gt;synctest.Test&lt;/code&gt;, time doesn&amp;rsquo;t pass on its own. It jumps forward
only when every goroutine in the bubble is blocked. A one-hour timeout
resolves instantly and deterministically.&lt;/p&gt;</description></item></channel></rss>