Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go的调度思考:抢占式调度 #3

Open
xpzouying opened this issue Aug 17, 2020 · 1 comment
Open

Go的调度思考:抢占式调度 #3

xpzouying opened this issue Aug 17, 2020 · 1 comment

Comments

@xpzouying
Copy link
Owner

xpzouying commented Aug 17, 2020

GOMAXPROCS=1时,下列程序,预期输出什么结果?

package main

func main() {
    go println("Hello ZOUYING!")

    for {
    }
}

测试运行:GOMAXPROCS=1 go run main.go

@xpzouying xpzouying changed the title Go抢占式调度 Go的调度思考:抢占式调度 Aug 17, 2020
@xpzouying xpzouying added the todo label Aug 17, 2020
@xpzouying
Copy link
Owner Author

测试环境与结果

在若干版本的环境中测试,测试结果如下:

go version result
go 1.4 无输出
go 1.5 无输出
go 1.7 无输出
go 1.14.6 输出"Hello ZOUYING!"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant