Documentation
¶
Overview ¶
Package lock is a wrapper for file description locks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
File is a flock() based avisory file lock.
dup()ed file descriptors share the same file description, and so share the same lock.
func OpenLockedExclusive ¶
OpenLockedExclusive opens the given path and acquires an exclusive lock.
func OpenLockedShared ¶
OpenShared opens the given path and acquires a shared lock.
func Shared ¶
Shared creates a new shared lock.
The lock is implicitly released when the file description of file is closed.
Returns an unlocked lock.
func (*File) Lock ¶
func (fl *File) Lock()
Lock implements sync.Locker.
It panics if the underlying syscalls return an error.
Click to show internal directories.
Click to hide internal directories.