don't heap allocate the cond, just set L
This commit is contained in:
parent
524564e2cf
commit
5cf6fdf81d
@ -97,7 +97,7 @@ type Blockstore struct {
|
||||
viewers sync.WaitGroup
|
||||
|
||||
moveMx sync.RWMutex
|
||||
moveCond *sync.Cond
|
||||
moveCond sync.Cond
|
||||
moveState int
|
||||
rlock int
|
||||
|
||||
@ -136,7 +136,7 @@ func Open(opts Options) (*Blockstore, error) {
|
||||
bs.prefixLen = len(bs.prefix)
|
||||
}
|
||||
|
||||
bs.moveCond = sync.NewCond(&bs.moveMx)
|
||||
bs.moveCond.L = &bs.moveMx
|
||||
|
||||
return bs, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user