mutex to preserve the integrity of some seriously important data
Ted Unangst tedu@tedunangst.com
Tue, 09 Feb 2021 18:48:36 -0500
1 files changed,
5 insertions(+),
0 deletions(-)
jump to
M
database.go
→
database.go
@@ -26,6 +26,7 @@ "log"
"sort" "strconv" "strings" + "sync" "time" "humungus.tedunangst.com/r/webs/cache"@@ -804,7 +805,11 @@ }
return nil } +var baxonker sync.Mutex + func addreaction(user *WhatAbout, xid string, who, react string) { + baxonker.Lock() + defer baxonker.Unlock() h := getxonk(user.ID, xid) if h == nil { return