Skip to Content
Skip to content
Go
Bound Concurrency in Go With a Fixed Worker Pool Level: Advanced

Stop spawning an unbounded goroutine per job and build a fixed-size worker pool in Go with bounded channels, context cancellation, and predictable memory usage.

Go
Choose Between sync.Mutex, sync.RWMutex, and sync/atomic Level: Advanced

Compare sync.Mutex, sync.RWMutex, and sync/atomic on real read-heavy and write-heavy Go benchmarks, and see when RWMutex slows down under contention.

Go
Stop time.After Memory Leaks in Go Loops Using NewTimer and NewTicker Level: Intermediate

Avoid accumulating uncollected timers in busy select loops by using time.NewTicker and stopped time.NewTimer instances. After this, polling loops keep memory flat under load.