lotus/lib/harmony/harmonytask/notifyingMx.go
Andrew Jackson (Ajax) 54dc885ae6 feat:miner:harmonytask
2023-08-14 11:40:12 -05:00

17 lines
202 B
Go

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()
}
}