MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / assert_ready

Function assert_ready

crates/wasmtime/src/runtime/vm.rs:466–468  ·  view source on GitHub ↗

Asserts that the future `f` is ready and returns its output. This function is intended to be used with `Store::validate_sync_call`. Internals of Wasmtime are generally `async` when they optionally can be, meaning that synchronous entrypoints will invoke this function after invoking the asynchronous internals. The `validate_sync_call` method ensures that during this `async` function call there won

(f: F)

Source from the content-addressed store, hash-verified

464///
465/// Panics if `f` is not yet ready.
466pub fn assert_ready<F: Future>(f: F) -> F::Output {
467 one_poll(f).unwrap()
468}
469
470/// Attempts one poll of `f` to see if its output is available.
471///

Callers 15

newMethod · 0.70
instantiateMethod · 0.70
try_newMethod · 0.70
newMethod · 0.70
growMethod · 0.70
vmimportMethod · 0.70
instantiateMethod · 0.50
newMethod · 0.50
new_fixedMethod · 0.50
newMethod · 0.50
newMethod · 0.50
newMethod · 0.50

Calls 2

one_pollFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected