Files
EdgeNode/internal/configs/serverconfigs/shared/locker.go
2020-09-09 18:53:53 +08:00

22 lines
265 B
Go

package shared
import (
"sync"
)
var Locker = new(FileLocker)
// global file modify locker
type FileLocker struct {
locker sync.Mutex
}
// lock
func (this *FileLocker) Lock() {
this.locker.Lock()
}
func (this *FileLocker) Unlock() {
this.locker.Unlock()
}