Skip to content

Commit

Permalink
docs: update GoDoc for ReadTransact()
Browse files Browse the repository at this point in the history
Mention that R/O transactions are garbage-collected once futures go out of scope.
  • Loading branch information
gm42 committed Sep 19, 2024
1 parent e27285f commit a93fdaa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bindings/go/src/fdb/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a93fdaa

Please sign in to comment.