Practise the standard verbs for finding and preventing goroutine leaks.
0 / 5 completed
1 / 5
Fill in: 'We ___ every goroutine we spawn a clear exit path, whether through a closed channel or a cancelled context, so it doesn't run forever unnoticed.'
We 'give a goroutine an exit path' — the standard, simple collocation for ensuring a spawned goroutine can terminate. The other options are less idiomatic here.
2 / 5
Fill in: 'Spawning a goroutine that blocks on an unbuffered channel nobody ever reads from can ___ that goroutine parked forever, quietly leaking memory for the life of the process.'
We say a blocked send will 'leave' a goroutine parked forever — the standard, natural collocation for the resulting leak. The other options aren't idiomatic here.
3 / 5
Fill in: 'We ___ goroutine counts in production continuously, since a steadily climbing number is often the first visible sign of a leak long before memory pressure appears.'
We 'monitor' goroutine counts — the standard collocation for ongoing observation of a runtime health metric. The other options aren't idiomatic here.
4 / 5
Fill in: 'We ___ a context with a timeout through every goroutine that calls a downstream service, so a hung dependency can't keep a goroutine blocked indefinitely.'
We 'pass a context' — the standard, established Go collocation for propagating cancellation and deadlines through call chains. The other options aren't the recognised term here.
5 / 5
Fill in: 'We ___ a suspected leak with pprof's goroutine profile, since it lists exactly which stack traces are accumulating instead of leaving us guessing at the cause.'
We 'diagnose a leak' — the standard, simple collocation for investigating the root cause of a runtime problem. The other options are less idiomatic here.