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.
3. Singleflight
Deduplicates concurrent identical calls so only one executes and all callers share the result.