From b384cd70b21402007ec2784666b1cc19b92d687a Mon Sep 17 00:00:00 2001 From: Crypt Keeper <64215+codefromthecrypt@users.noreply.github.com> Date: Tue, 21 Mar 2023 11:11:38 +0800 Subject: [PATCH] Documents api.Closer closes even if a context is canceled (#1263) Signed-off-by: Adrian Cole --- api/wasm.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/wasm.go b/api/wasm.go index d981cb83..7fb2ae6b 100644 --- a/api/wasm.go +++ b/api/wasm.go @@ -189,10 +189,12 @@ type Module interface { } // Closer closes a resource. -// -// Note: This is an interface for decoupling, not third-party implementations. All implementations are in wazero. type Closer interface { // Close closes the resource. + // + // Note: The context parameter is used for value lookup, such as for + // logging. A canceled or otherwise done context will not prevent Close + // from succeeding. Close(context.Context) error }