diff options
author | Matt Joiner <anacrolix@gmail.com> | 2020-10-02 17:35:11 +1000 |
---|---|---|
committer | Matt Joiner <anacrolix@gmail.com> | 2020-10-02 17:35:11 +1000 |
commit | c35a2c748c6ad053344c9f15f6f86246e48628e0 (patch) | |
tree | e33b8b691286fb48dd637d47589c4e163af62495 /tx.go | |
parent | Use builtin eq var in rate and stmutil (diff) | |
download | stm-c35a2c748c6ad053344c9f15f6f86246e48628e0.tar.gz stm-c35a2c748c6ad053344c9f15f6f86246e48628e0.tar.xz |
Only wake Tx if they're still reading a modified value
Diffstat (limited to 'tx.go')
-rw-r--r-- | tx.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -121,12 +121,14 @@ func (tx *Tx) Assert(p bool) { } func (tx *Tx) reset() { + tx.mu.Lock() for k := range tx.reads { delete(tx.reads, k) } for k := range tx.writes { delete(tx.writes, k) } + tx.mu.Unlock() tx.removeRetryProfiles() tx.resetLocks() } |