Hi all, I wrote a simple application: the main function creates two goroutines, while these two goroutines use RPC to do simple communication continually.
I found *if the main function falls into a busy loop after creating the two goroutines, * *the whole application will hang up after sending/receiving a couple number of RPCs* (~80 on my testbed). Can anyone illustrate why this happens? As each goroutine uses independent Linux threads, why one spins can affect others? I use *runtime.GOMAXPROCS(4)* to make sure each goroutine uses a Linux thread and the testbed is ubuntu 14.04 with 8 CPU cores. I use the go1.7.3 library which is compiled from the source code. I also attach the source code of the simple test, you should be able to run it with "go run test.go". -- 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. For more options, visit https://groups.google.com/d/optout.
test.go
Description: Binary data