mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 19:23:25 +00:00
wasm: don't block //go:wasmexport because of running goroutines
This fixes bug https://github.com/tinygo-org/tinygo/issues/4874.
This commit is contained in:
committed by
Ron Evans
parent
0c2ab895b7
commit
612a38e363
@@ -687,6 +687,10 @@ func TestWasmExport(t *testing.T) {
|
||||
// again.
|
||||
checkResult("reentrantCall(2, 3)", mustCall(mod.ExportedFunction("reentrantCall").Call(ctx, 2, 3)), []uint64{5})
|
||||
checkResult("reentrantCall(1, 8)", mustCall(mod.ExportedFunction("reentrantCall").Call(ctx, 1, 8)), []uint64{9})
|
||||
|
||||
// Check that goroutines started inside //go:wasmexport don't
|
||||
// block the called function from returning.
|
||||
checkResult("goroutineExit()", mustCall(mod.ExportedFunction("goroutineExit").Call(ctx)), nil)
|
||||
}
|
||||
|
||||
// Add wasip1 module.
|
||||
|
||||
Reference in New Issue
Block a user