runtime: lock the main goroutine to the main OS thread during init
We only guarantee that the main goroutine runs on the main OS thread for initialization. Programs that wish to preserve that property for main.main can call runtime.LockOSThread. This is what programs used to do before we unleashed goroutines during init, so it is both a simple fix and keeps existing programs working. R=iant, r, dave, dvyukov CC=golang-dev https://golang.org/cl/5309070
Showing
Please
register
or
sign in
to comment