```go
package main
import (
"fmt"
"runtime"
"time"
)
func main() {
var ok bool
cpuNu := runtime.NumCPU()
for i := 0; i < cpuNu; i++ {
go func() {
for {
if ok {
// to do
}
}
}()
}
time.Sleep(3 * time.Second)
fmt.Println("Not print...why???")
}
```
有疑问加站长微信联系(非本文作者)