aboutsummaryrefslogtreecommitdiff
path: root/ref/store/batch.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-28 16:53:46 +0000
committerGravatar Runxi Yu2026-03-28 16:59:00 +0000
commit94a57d1621bec7a3e3e564cbef1d5d9b0cbc1441 (patch)
tree81aa2e20fbd948fc1f873a86d15d5d2e7b04450e /ref/store/batch.go
parentref: Consider casting to [Detached] or [Symbolic]. (diff)
signatureNo signature
ref/store: Clarify contract
Diffstat (limited to 'ref/store/batch.go')
-rw-r--r--ref/store/batch.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/ref/store/batch.go b/ref/store/batch.go
index 6a877a2c..765846d6 100644
--- a/ref/store/batch.go
+++ b/ref/store/batch.go
@@ -9,6 +9,8 @@ import objectid "codeberg.org/lindenii/furgit/object/id"
//
// A batch borrows its underlying store and is invalid after that store is
// closed.
+//
+// Labels: MT-Unsafe.
type Batch interface {
// Create creates one detached reference, requiring that the logical
// reference does not already exist.
@@ -38,11 +40,11 @@ type Batch interface {
// Apply validates and applies queued operations, returning one result per
// queued operation in order. Fatal backend failures are returned separately.
//
- // Apply is terminal. Further use of the batch is undefined behavior.
+ // Apply invalidates the receiver.
Apply() ([]BatchResult, error)
// Abort abandons the batch and releases any resources it holds.
//
- // Abort is terminal. Further use of the batch is undefined behavior.
+ // Abort invalidates the receiver.
Abort() error
}