mutex to preserve the integrity of some seriously important data
This commit is contained in:
parent
715e79a5b4
commit
13d6bc9a81
1 changed files with 5 additions and 0 deletions
|
@ -26,6 +26,7 @@ import (
|
|||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"humungus.tedunangst.com/r/webs/cache"
|
||||
|
@ -804,7 +805,11 @@ func saveextras(tx *sql.Tx, h *Honk) error {
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue