YieldFrame: pause wasm environment till end of frame

This commit is contained in:
2024-04-22 12:21:25 -07:00
parent 13b61a6def
commit 03a8ae9a24
8 changed files with 160 additions and 22 deletions

View File

@ -0,0 +1 @@
build/

Binary file not shown.

1
example_project/go.work Normal file
View File

@ -0,0 +1 @@
go 1.21.5

View File

@ -2,7 +2,6 @@ package main
import (
"fmt"
"runtime/debug"
)
func main() {
@ -10,7 +9,13 @@ func main() {
for {
fmt.Printf("Hello! %d", count)
count++
debug.PrintStack()
panic("pizza!")
/*
debug.PrintStack()
*/
YieldFrame()
}
}
//go:wasmimport viperid YieldFrame
//go:noescape
func YieldFrame()