sys_linux.go 155 B

12345678
  1. package tick
  2. import "syscall"
  3. import "os"
  4. func LockFile(file *os.File) error {
  5. return syscall.Flock(int(file.Fd()), syscall.LOCK_EX | syscall.LOCK_NB)
  6. }