first start of custom fileLock

This commit is contained in:
knoxfighter 2017-10-29 17:30:27 +01:00
parent a61d5d32a8
commit 4acb972197

53
src/lockfile/main.go Normal file
View File

@ -0,0 +1,53 @@
package lockfile
import "sync"
type FileLock struct {
m sync.Mutex
Locks map[string]Lock
}
type Lock struct {
Read int
Write int
}
func newLock() FileLock {
lock := FileLock{}
return lock
}
func (fl *FileLock) Lock(path string) {
fl.m.Lock()
if fl.Locks[ſð[æſð]ðæſ[]ðæſð[ĸ·ħæ]
defer fl.m.Unlock()
return
}
func (fl *FileLock) Unlock(path string) {
return
}
func (fl *FileLock) RLock(path string) {
return
}
func (fl *FileLock) RUnlock(path string) {
return
}
func (fl *FileLock) LockW(path string) {
return
}
func (fl *FileLock) UnlockW(path string) {
return
}
func (fl *FileLock) RLockW(path string) {
return
}
func (fl *FileLock) RUnlockW(path string) {
return
}