Documents api.Closer closes even if a context is canceled (#1263)

Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
Crypt Keeper
2023-03-21 11:11:38 +08:00
committed by GitHub
parent c46a6eb4ae
commit b384cd70b2

View File

@@ -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
}