run init in a goroutine

This commit is contained in:
Jaden Weiss
2020-02-07 19:20:36 -05:00
committed by Ayke
parent 5d869f6042
commit 0759b70c50
7 changed files with 21 additions and 7 deletions
+3 -2
View File
@@ -14,9 +14,10 @@ func sleep(duration int64) {
// run is called by the program entry point to execute the go program.
// With a scheduler, init and the main function are invoked in a goroutine before starting the scheduler.
func run() {
initAll()
postinit()
initHeap()
go func() {
initAll()
postinit()
callMain()
}()
scheduler()