Synchronization Patterns

Patterns involving coordinating shared state between goroutines.

1. Mutex

Ensures exclusive access to a resource by one goroutine at a time.

2. Semaphore

Controls the number of goroutines allowed to access a resource at once.


Table of contents


This site is open source! You can contribute or suggest changes by editing the GitHub repository.
Copyright © 2025. Distributed by an MIT license.