I write a simple program likes below and it triggers a data race alarm with -race flag. But no matter how I run, this program will not panic. I know it is legal to receive messages from nil channels, but I don't quite understand why this program does not panic in the presence of data races.
ch := make(chan struct{}) go func() { ch = nil }() go func() { <-ch }() -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/02e2fa3e-1952-4dda-8bfa-18f619e21ec9%40googlegroups.com.