wasm_runtime_begin_blocking_op: A comment about usage expectation (#3056)

This commit is contained in:
YAMAMOTO Takashi 2024-01-19 19:31:21 +09:00 committed by GitHub
parent a7545df5d0
commit 17b0111577
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)) {