Golang的Go Routine背后的架构是什么?

What is the architecture behind Golang's Go Routine?

I believe that Go doesn't just fork a new thread for each routine.

There have been Go implementations in the past that did in fact create a new thread for each goroutine.

In the main Go implementation, a Go routine is basically just a stack (usually small) with some additional context (in 1.5, see type g in runtime/runtime2.go). Changing from goroutine to another means changing the stack pointer and the thread-local variable that points to the currently running goroutine.