A channel can potentially be used by multiple Go routines. Is getting the length of the channel by using len(channel) from some of the Go routines thread-safe?
It kind of depends on your use case
it is indeed safe to call, but the result cannot be trusted when other goroutines are sending / taking from that channel