Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrLockBusy = errors.New("lock busy: held by another process")
ErrLockBusy is returned when a non-blocking lock cannot be acquired because another process holds a conflicting lock.
var ErrLocked = errProcessLocked
ErrLocked is returned when a lock cannot be acquired because it is held by another process.
Functions ¶
func FlockExclusiveBlocking ¶
FlockExclusiveBlocking acquires an exclusive blocking lock on the file. This will wait until the lock is available.
func FlockExclusiveNonBlock ¶
FlockExclusiveNonBlock acquires an exclusive non-blocking lock on the file. Returns ErrLockBusy if any lock (shared or exclusive) is already held.
func FlockExclusiveNonBlocking ¶
FlockExclusiveNonBlocking attempts to acquire an exclusive lock without blocking. Returns ErrLocked if the lock is held by another process.
func FlockSharedNonBlock ¶
FlockSharedNonBlock acquires a shared non-blocking lock on the file. Multiple processes can hold shared locks concurrently. Returns ErrLockBusy if an exclusive lock is already held.
Types ¶
This section is empty.