pub unsafe extern "C" fn wasm_runtime_terminate(
module_inst: wasm_module_inst_t,
)
Expand description
Terminate the WASM module instance.
This function causes the module instance fail as if it raised a trap.
This is intended to be used in situations like:
-
A thread is executing the WASM module instance (eg. it’s in the middle of
wasm_application_execute_main
) -
Another thread has a copy of
wasm_module_inst_t
of the module instance and wants to terminate it asynchronously.
@param module_inst the WASM module instance