Documentation
¶
Overview ¶
Package filelock takes an open file's exclusive lock, across processes. The system releases a lock when its process ends, so a crash never leaves one held.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrHeld = errors.New("the lock is held")
ErrHeld is a lock another process, or another open of the file, holds.
Functions ¶
func Lock ¶
Lock takes f's lock, waiting while it's held, until ctx is done. An error other than the lock being held, such as a file system without locks, returns at once.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.