aboutsummaryrefslogtreecommitdiff
path: root/funcs.go
diff options
context:
space:
mode:
authorMatt Joiner <anacrolix@gmail.com>2020-08-28 10:43:34 +1000
committerMatt Joiner <anacrolix@gmail.com>2020-08-28 10:43:34 +1000
commit597720941a528be2e43789a10781346a6dff7607 (patch)
treeaf6bbab0e2d91528d2ef3eb30704fbee557a11d4 /funcs.go
parentDedicated tx locks type (diff)
downloadstm-597720941a528be2e43789a10781346a6dff7607.tar.gz
stm-597720941a528be2e43789a10781346a6dff7607.tar.xz
Reduce more allocations
Diffstat (limited to 'funcs.go')
-rw-r--r--funcs.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/funcs.go b/funcs.go
index b13a917..aad9c90 100644
--- a/funcs.go
+++ b/funcs.go
@@ -9,8 +9,9 @@ var (
txPool = sync.Pool{New: func() interface{} {
expvars.Add("new txs", 1)
tx := &Tx{
- reads: make(map[*Var]uint64),
- writes: make(map[*Var]interface{}),
+ reads: make(map[*Var]uint64),
+ writes: make(map[*Var]interface{}),
+ watching: make(map[*Var]struct{}),
}
tx.cond.L = &tx.mu
return tx