|
|
|
|
|
by dlock17
611 days ago
|
|
Closing the channel is pointless. I don't understand why people get obsessive about closing channels. It's not needed by the garbage collector, it's not good practice. It's explicitly called out in the official go guide as unnecessary most of the time. [0] If you have a channel that is only used a single time and then discarded, closing it is literally just wasting CPU cycles.
And definitely not "lazy/rude". [0] https://go.dev/tour/concurrency/4 |
|