mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 15:03:41 +00:00
interp: run goroutine starts and checks at runtime
This change prevents interp from trying to execute goroutine starts or checks. This fixes a bug where a goroutine started by an init function would run before the init function.
This commit is contained in:
Vendored
+6
@@ -6,6 +6,12 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
func init() {
|
||||
println("init")
|
||||
go println("goroutine in init")
|
||||
time.Sleep(1 * time.Millisecond)
|
||||
}
|
||||
|
||||
func main() {
|
||||
println("main 1")
|
||||
go sub()
|
||||
|
||||
Reference in New Issue
Block a user