Home »
Code Examples »
Golang Code Examples
Golang - Is it OK to leave a channel open? Code Example
Here is the solution for "Is it OK to leave a channel open?" in Golang.
Golang code for Is it OK to leave a channel open?
It's OK to leave a Go channel open forever and never close it.
When the channel is no longer used, it will be garbage collected.
Code by IncludeHelp,
on March 4, 2023 23:37
Reference:
stackoverflow