aboutsummaryrefslogtreecommitdiff
path: root/tx.go
diff options
context:
space:
mode:
authorChris Wendt <chrismwendt@gmail.com>2022-06-08 03:27:33 -0600
committerChris Wendt <chrismwendt@gmail.com>2022-06-08 03:27:33 -0600
commite6ac933d42b3b4a8ffd891b205ba48f0c1e278a4 (patch)
treee103d0d81145c087011846af75aac7d328b917c1 /tx.go
parentAtomicSet generic value (diff)
downloadstm-e6ac933d42b3b4a8ffd891b205ba48f0c1e278a4.tar.gz
stm-e6ac933d42b3b4a8ffd891b205ba48f0c1e278a4.tar.xz
replace "interface{}" with "any"
Diffstat (limited to '')
-rw-r--r--tx.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/tx.go b/tx.go
index 4542e61..825ff01 100644
--- a/tx.go
+++ b/tx.go
@@ -11,7 +11,7 @@ import (
type txVar interface {
getValue() *atomic.Value[VarValue]
- changeValue(interface{})
+ changeValue(any)
getWatchers() *sync.Map
getLock() *sync.Mutex
}
@@ -19,7 +19,7 @@ type txVar interface {
// A Tx represents an atomic transaction.
type Tx struct {
reads map[txVar]VarValue
- writes map[txVar]interface{}
+ writes map[txVar]any
watching map[txVar]struct{}
locks txLocks
mu sync.Mutex