Menu

Post image 1
Post image 2
Post image 3
Post image 4
1 / 4
0

Goroutine Leak Profiles - The Go Programming Language

Hacker News·about 2 hours ago
#AL59wVNV
Reading 0:00
15s threshold

Go’s concurrency features are powerful and easy to use, but that same ease can sometimes lead even seasoned developers to make mistakes. Fortunately, the Go ecosystem comes equipped with useful tools for debugging, e.g., the race detector , but even existing tools may miss some concurrency bugs, such as the topic of this article, the goroutine leak . Goroutines synchronize or exchange information via shared concurrency primitives, e.g., channels, locks, and wait groups. While communicating, goroutines often block on these primitives, as in, wait until some condition is met; ubiquitous examples include waiting to acquire a held mutex, or receive a message over a channel. Goroutines can also block on operating system operations, like reading from a network socket or a file. We may consider a goroutine leaked if it is blocked, but the conditions needed to unblock it can never be met.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More