how does Golang implement OS threads for goroutines?

时间:2016-08-31 18:21:09

标签: go

I'm trying to figure out how golang multiplexes goroutines onto OS threads but I couldn't find the implementation for this in the golang source. I've looked in proc.go and runtime.go. I want to know how threads are initialized and managed and if it uses pthreads.

1 个答案:

答案 0 :(得分:0)

每个操作系统的策略都不同。
一些例子在the windows os portion for the Go runtime和。{ the linux os portion for the Go runtime