4 ms·
Another thing that drove me up the wall recently (semi-related to leaking goroutines) are libraries that doesn't use the context package or a done/quit channel
by otter-in-a-suit 6y ago
Another thing that drove me up the wall recently (semi-related to leaking goroutines) are libraries that doesn't use the context package or a done/quit channel and can get stuck in long-running operations that hug absurd amounts of CPU/memory.
As far as I'm aware, you simply cannot kill a goroutine from another goroutine, i.e. there is no terminate()/stop() construct, meaning you cannot implement a timeout on top of an existing library without actually modifying said library.