lock

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Deadline = 10 * time.Second

Deadline bounds how long one operation waits for a contended lock. A wedged holder must produce a refusal with a legal recovery action, never a hang.

Functions

func With

func With(path string, fn func() error) error

With serializes work across processes and goroutines. The OS releases the file lock if its process exits, so no unsafe stale-lock deletion is needed. Contention past Deadline refuses instead of blocking forever.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL