Hi All,

I am not able to understand why this piece of go code  deadlocks.
Doesn't empty select{} blocks forever, irrespective of other go routines  
to wake that up.

https://play.golang.org/p/zBWZPjTGYX7

Please help me to understand why code is detected as deadlock.
And When I run this code with go run -race main.go in Linux box(go version 
go1.13.6 linux/amd64), it prints "received 5" waits forever. 
I expect same to happen, when built and run. 

Sorry, if this is already answered, please point me.

Thanks ,
Aravindhan K

-- 
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/5eeffc06-15e6-47d8-a662-43746f2e8fe5%40googlegroups.com.

Reply via email to