It depends who can see that variable, if this is a global variable, or its
address has been taken it is not safe. If the variable is private the goroutine
then it is safe becase there is no race on private variables. Remember a
variable of type chan is just a pointer.
--
You received this mes
Is setting a channel to nil, or to another channel, concurrent safe?
I guess it is not safe. Because it's a normal variable carrying the
channel. But Go does some hidden optimizations, I wondered if this one is
of those cases too.
--
You received this message because you are subscribed to the