阶段性提交

This commit is contained in:
刘祥超
2020-09-13 19:27:47 +08:00
commit dd504b39c8
120 changed files with 19900 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
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()
}