Re:Updating the Go Memory Model
by sagichmal on Monday July 12, 2021 @09:32PM
(#27816875)
> I still run into deadlocks and panics (writing to a closed channel) when I try to use channels beyond the simplest use cases.
Wild!
The rule is that channels are owned by a single goroutine, who's uniquely responsible for sending on them, and closing them. That's basically it. Do that and everything works fine, in my experience.
Wild!
The rule is that channels are owned by a single goroutine, who's uniquely responsible for sending on them, and closing them. That's basically it. Do that and everything works fine, in my experience.