mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-18 19:44:00 +00:00
run init in a goroutine
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user