Skip to content

Commit

Permalink
Fix close for concurrent-instantiation example
Browse files Browse the repository at this point in the history
Signed-off-by: Edward McFarlane <emcfarlane@buf.build>
  • Loading branch information
emcfarlane committed Sep 5, 2024
1 parent dbc4b62 commit eb6523e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/concurrent-instantiation/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func main() {
if err != nil {
log.Panicf("[%d] failed to instantiate %v", i, err)
}
defer instance.Close(ctx) // This closes everything this Instance created.

// Calculates "i + i" by invoking the exported "add" function.
result, err := instance.ExportedFunction("add").Call(ctx, uint64(i), uint64(i))
Expand Down

0 comments on commit eb6523e

Please sign in to comment.