From a93fdaad1a9b2d6040b6f9d6086f59723735046a Mon Sep 17 00:00:00 2001 From: gm42 <16498973+gm42@users.noreply.github.com> Date: Thu, 19 Sep 2024 12:38:00 +0200 Subject: [PATCH] docs: update GoDoc for ReadTransact() Mention that R/O transactions are garbage-collected once futures go out of scope. --- bindings/go/src/fdb/database.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bindings/go/src/fdb/database.go b/bindings/go/src/fdb/database.go index 50384af3d6e..124e429f125 100644 --- a/bindings/go/src/fdb/database.go +++ b/bindings/go/src/fdb/database.go @@ -227,7 +227,8 @@ func (d Database) Transact(f func(Transaction) (interface{}, error)) (interface{ // // The transaction is retried if the error is or wraps a retryable Error. // The error is unwrapped. -// Read transactions are never committed and destroyed before returning to caller. +// Read transactions are never committed and destroyed automatically via GC, +// once all their futures go out of scope. // // Do not return Future objects from the function provided to ReadTransact. The // Transaction created by ReadTransact may be finalized at any point after