Grokking Advanced Go
Vote

0% completed

​

Block and Mutex Profiles

A block profile records where goroutines waited, and for how long. It covers locks, wait groups, and channel operations. A mutex is a lock that only one goroutine can hold at a time, and a mutex profile records which code held a contended lock, meaning a lock that another goroutine wanted at the same time. The first names the code that waited, and the second names the code that made it wait.

Both exist because a CPU profile does not record waiting. A blocked goroutine is not running on a CPU, so it produces no samples

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content