Only close channels when trying to tell the receiver that you're not sending more data. Otherwise let the garbage collector deal with it. Channels seem easy until they don't until they do again in my experience.
yeah the lack of determinism in selecting a channel can be tricky for causing bugs where order matters. Luckily in smaller cases you're likely to encounter them as flakey tests (eg 1/2 the time)
thanks for this, i couldn’t articulate it so clearly.
Another gotcha is responding to closed channels, it makes sense in the grand scheme of things but when the program grows it gets tricky
Don't understand your second point.