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 /funcs.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 'funcs.go')
-rw-r--r-- | funcs.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -71,7 +71,9 @@ retry: time.Sleep(time.Duration(ns)) } } + tx.mu.Lock() ret, retry := catchRetry(op, tx) + tx.mu.Unlock() if retry { expvars.Add("retries", 1) // wait for one of the variables we read to change before retrying |