aboutsummaryrefslogtreecommitdiff
path: root/tx.go
diff options
context:
space:
mode:
authorMatt Joiner <anacrolix@gmail.com>2021-09-04 21:09:25 +1000
committerChris Wendt <chrismwendt@gmail.com>2022-06-08 03:02:44 -0600
commit8d82a394042feb858f8b8b40f199f9ede5cc1b83 (patch)
treebfa5db946ca7ccb8d2c6cdf0f2e63c97382e90fc /tx.go
parentBIG change: generic Var[T], txVar, etc. (diff)
downloadstm-8d82a394042feb858f8b8b40f199f9ede5cc1b83.tar.gz
stm-8d82a394042feb858f8b8b40f199f9ede5cc1b83.tar.xz
Make Operation generic
From https://github.com/anacrolix/stm/commit/80e033aa1f2218b83fb5891671ed795de72e19d5
Diffstat (limited to 'tx.go')
-rw-r--r--tx.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tx.go b/tx.go
index 0d69498..2020308 100644
--- a/tx.go
+++ b/tx.go
@@ -114,7 +114,7 @@ type txProfileValue struct {
// Retry aborts the transaction and retries it when a Var changes. You can return from this method
// to satisfy return values, but it should never actually return anything as it panics internally.
-func (tx *Tx) Retry() interface{} {
+func (tx *Tx) Retry() struct{} {
retries.Add(txProfileValue{tx, tx.numRetryValues}, 1)
tx.numRetryValues++
panic(retry)