lotus/lib/harmony/harmonytask/notifyingMx.go

17 lines
202 B
Go
Raw Normal View History

2023-08-14 16:40:12 +00:00
package harmonytask
import "sync"
type notifyingMx struct {
sync.Mutex
UnlockNotify func()
}
func (n *notifyingMx) Unlock() {
tmp := n.UnlockNotify
n.Mutex.Unlock()
if tmp != nil {
tmp()
}
}