From 17b0111577dd083856a17bbaaea5a470276509b4 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 19 Jan 2024 19:31:21 +0900 Subject: [PATCH] wasm_runtime_begin_blocking_op: A comment about usage expectation (#3056) --- core/iwasm/include/wasm_export.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/iwasm/include/wasm_export.h b/core/iwasm/include/wasm_export.h index 4a23b8d1..dda058d0 100644 --- a/core/iwasm/include/wasm_export.h +++ b/core/iwasm/include/wasm_export.h @@ -1607,6 +1607,9 @@ wasm_runtime_get_context(wasm_module_inst_t inst, void *key); * host functions. It wraps an operation which possibly blocks for long * to prepare for async termination. * + * For simplicity, we recommend to wrap only the very minimum piece of + * the code with this. Ideally, just a single system call. + * * eg. * * if (!wasm_runtime_begin_blocking_op(exec_env)) {