YieldFrame: pause wasm environment till end of frame
This commit is contained in:
1
example_project/.gitignore
vendored
1
example_project/.gitignore
vendored
@ -0,0 +1 @@
|
||||
build/
|
Binary file not shown.
1
example_project/go.work
Normal file
1
example_project/go.work
Normal file
@ -0,0 +1 @@
|
||||
go 1.21.5
|
@ -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()
|
||||
|
Reference in New Issue
Block a user