From 5796897f37852bf2042cd63959ce4ff673c4366e Mon Sep 17 00:00:00 2001 From: Takeshi Yoneda Date: Fri, 1 Dec 2023 07:07:21 +0900 Subject: [PATCH] doc: clarify the forbidden use of Call with inflight calls (#1853) --- api/wasm.go | 1 + 1 file changed, 1 insertion(+) diff --git a/api/wasm.go b/api/wasm.go index f611d3ea..d6a0d796 100644 --- a/api/wasm.go +++ b/api/wasm.go @@ -374,6 +374,7 @@ type Function interface { // Call is not goroutine-safe, therefore it is recommended to create // another Function if you want to invoke the same function concurrently. // On the other hand, sequential invocations of Call is allowed. + // However, this should not be called multiple times until the previous Call returns. // // To safely encode/decode params/results expressed as uint64, users are encouraged to // use api.EncodeXXX or DecodeXXX functions. See the docs on api.ValueType.