lockWithDeferreds: inlineable Unlock() (#603)
This commit is contained in:
parent
b757b62cf4
commit
35ad29dccc
|
@ -15,10 +15,11 @@ func (me *lockWithDeferreds) Lock() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (me *lockWithDeferreds) Unlock() {
|
func (me *lockWithDeferreds) Unlock() {
|
||||||
for _, a := range me.unlockActions {
|
unlockActions := me.unlockActions
|
||||||
a()
|
for i := 0; i < len(unlockActions); i += 1 {
|
||||||
|
unlockActions[i]()
|
||||||
}
|
}
|
||||||
me.unlockActions = me.unlockActions[:0]
|
me.unlockActions = unlockActions[:0]
|
||||||
me.internal.Unlock()
|
me.internal.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue