diff options
author | Chris Wendt <chrismwendt@gmail.com> | 2022-06-08 01:35:20 -0600 |
---|---|---|
committer | Chris Wendt <chrismwendt@gmail.com> | 2022-06-08 01:35:20 -0600 |
commit | 53b98cfddef7afcb79d8a1b35fb186b58426c1d4 (patch) | |
tree | 377c94fe85502b2525615dbc51d68d6a3ec0e1e9 /tx.go | |
parent | go mod tidy (diff) | |
download | stm-53b98cfddef7afcb79d8a1b35fb186b58426c1d4.tar.gz stm-53b98cfddef7afcb79d8a1b35fb186b58426c1d4.tar.xz |
use generic atomic
Diffstat (limited to 'tx.go')
-rw-r--r-- | tx.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -24,7 +24,7 @@ type Tx struct { // Check that none of the logged values have changed since the transaction began. func (tx *Tx) inputsChanged() bool { for v, read := range tx.reads { - if read.Changed(v.value.Load().(VarValue)) { + if read.Changed(v.value.Load()) { return true } } @@ -84,7 +84,7 @@ func (tx *Tx) Get(v *Var) interface{} { // If we haven't previously read v, record its version vv, ok := tx.reads[v] if !ok { - vv = v.value.Load().(VarValue) + vv = v.value.Load() tx.reads[v] = vv } return vv.Get() |