稼動中のgoroutineの数え方
func numGoroutine() {
for {
fmt.Println("======>numGoroutine", runtime.NumGoroutine())
time.Sleep(1 * time.Second) // 1秒待つ
}
}
江端智一のホームページ
func numGoroutine() {
for {
fmt.Println("======>numGoroutine", runtime.NumGoroutine())
time.Sleep(1 * time.Second) // 1秒待つ
}
}