← Advanced Concurrency Engineering

In progress

Part 23 - Semaphores: Limiting One Section, Not the Whole Worker

A worker pool limits how many goroutines exist. A semaphore limits how many of them can be inside one piece of code at once. Part 23 caps concurrent embedding calls with a channel semaphore, then builds a weighted semaphore for token-sized requests and fixes the cancellation bug hiding in the obvious sync.Cond version.

This post is still being written. The title and outline are published so you can follow along with the series — the full article will replace this page when it ships.