aboutsummaryrefslogtreecommitdiff
path: root/tx.go
diff options
context:
space:
mode:
authorMatt Joiner <anacrolix@gmail.com>2019-10-23 16:10:34 +1100
committerMatt Joiner <anacrolix@gmail.com>2019-10-23 16:10:34 +1100
commit31c4fd7ec9d8a80202ba446c9087ab3fd30cbe72 (patch)
tree66af34984a37cf528cece8f836000353c24e3683 /tx.go
parentAdd PingPong test and benchmark (diff)
downloadstm-31c4fd7ec9d8a80202ba446c9087ab3fd30cbe72.tar.gz
stm-31c4fd7ec9d8a80202ba446c9087ab3fd30cbe72.tar.xz
Improve comment on Tx.verify
Diffstat (limited to 'tx.go')
-rw-r--r--tx.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/tx.go b/tx.go
index f63de76..127480e 100644
--- a/tx.go
+++ b/tx.go
@@ -6,9 +6,7 @@ type Tx struct {
writes map[*Var]interface{}
}
-// verify checks that none of the logged values have changed since the
-// transaction began.
-// TODO: is pointer equality good enough? probably not, without immutable data
+// Check that none of the logged values have changed since the transaction began.
func (tx *Tx) verify() bool {
for v, version := range tx.reads {
v.mu.Lock()