Descriptionruntime: 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.
Patch Set 1 #Patch Set 2 : diff -r 181517df0815 https://go.googlecode.com/hg/ #Patch Set 3 : diff -r 181517df0815 https://go.googlecode.com/hg/ #Patch Set 4 : diff -r 181517df0815 https://go.googlecode.com/hg/ #
Total comments: 4
Patch Set 5 : diff -r 3f70682b9214 https://go.googlecode.com/hg/ #Patch Set 6 : diff -r 3f70682b9214 https://go.googlecode.com/hg/ #Patch Set 7 : diff -r 738f105abf75 https://go.googlecode.com/hg/ #
MessagesTotal messages: 23
|