goroutine
A goroutine is a lightweight unit of concurrent execution in Go.
Use this when Go background work survives its request or becomes stuck on a channel.
without the term
“Our Go service's memory and goroutine count keep climbing. I think background goroutines started per request never finish. Can you make sure they stop?”
with the term · How do you ask a model for goroutine?
Tie this goroutine to an explicit lifecycle. Test cancellation while blocked, bounded concurrency, and delivery of its result or error.
What is goroutine?
Starting a goroutine takes only the go keyword, but something must still stop it, wait for it, and collect its error. Otherwise it leaks or blocks forever on a channel.
Why does goroutine matter when vibe coding?
Starting work is easy while observing its completion and cancellation is easy to omit.
How do you do goroutine?
Define who starts, stops, and waits for the goroutine, including blocked sends and receives.
What goes wrong with goroutine?
Checking cancellation only after a channel operation that can block forever.