From a3e788d52494b75b927538c9c2bfee1573aa50e1 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Wed, 30 Sep 2020 19:13:27 +1000 Subject: Wake watchers until the var changes again --- funcs.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'funcs.go') diff --git a/funcs.go b/funcs.go index 59c0e74..b8c8464 100644 --- a/funcs.go +++ b/funcs.go @@ -74,7 +74,7 @@ retry: } // verify the read log tx.lockAllVars() - if !tx.verify() { + if tx.inputsChanged() { tx.unlock() expvars.Add("failed commits", 1) if profileFailedCommits { @@ -84,6 +84,10 @@ retry: } // commit the write log and broadcast that variables have changed tx.commit() + tx.mu.Lock() + tx.completed = true + tx.cond.Broadcast() + tx.mu.Unlock() tx.unlock() expvars.Add("commits", 1) tx.recycle() -- cgit v1.2.3