aboutsummaryrefslogtreecommitdiff
path: root/tx.go
diff options
context:
space:
mode:
Diffstat (limited to 'tx.go')
-rw-r--r--tx.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/tx.go b/tx.go
index cdeac0b..ab800b0 100644
--- a/tx.go
+++ b/tx.go
@@ -43,9 +43,14 @@ func (tx *Tx) wait() {
v.watchers.Store(tx, nil)
}
tx.mu.Lock()
+ firstWait := true
for tx.verify() {
+ if !firstWait {
+ expvars.Add("wakes for unchanged versions", 1)
+ }
expvars.Add("waits", 1)
tx.cond.Wait()
+ firstWait=false
}
tx.mu.Unlock()
for v := range tx.reads {