Tags: dicej/go
Tags
add `runtime.wasiOnIdle` function This allows the goroutine handing a call to an [async-lifted export function](https://github.com/WebAssembly/component-model/blob/main/design/mvp/Concurrency.md#async-export-abi) to wait for all other goroutines to make as much progress as they can before returning control to the host. Specifically, it's used to delay returning `CALLBACK_CODE_WAIT` until all goroutines have had a chance to add their waitables to the waitable set. In other words, this allows a WebAssembly component to bridge its Go scheduler with the host scheduler, allowing them to hand off control to each other at the appropriate times. Signed-off-by: Joel Dice <joel.dice@fermyon.com>
add `runtime.WasiOnIdle` function This allows the goroutine handing a call to an [async-lifted export function](https://github.com/WebAssembly/component-model/blob/main/design/mvp/Concurrency.md#async-export-abi) to wait for all other goroutines to make as much progress as they can before returning control to the host. Specifically, it's used to delay returning `CALLBACK_CODE_WAIT` until all goroutines have had a chance to add their waitables to the waitable set. In other words, this allows a WebAssembly component to bridge its Go scheduler with the host scheduler, allowing them to hand off control to each other at the appropriate times. Signed-off-by: Joel Dice <joel.dice@fermyon.com>