Swimming pool semaphores

Programming languages

There are 2 easy ways to implement a semaphore with a buffered channel, in order to limit the concurrent access to a resource. Let's illustrate this with a swimming pool!

Then, we'll see in a real use case how to extend sync.WaitGroup and errgroup.Group to leverage concurrency without hitting DB connections exhaustion errors.

Concurrency Errors

Valentin Deleplace


I'm a developer of backends, cloud architecture, performance, algorithms (big-O), databases, and UX. I love coding in Go. I work as a Developer Advocate for Google Cloud Platform.

Talks by tracksTalks by session typesList of SpeakersSchedule