flock

package
v0.0.0-...-f4dfa5d Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Acquire

func Acquire(path string) (int, error)

Acquire creates an exclusive lock on a file for the duration of the process, or until Release(d). This method is reentrant.

func AcquireShared

func AcquireShared(path string) (int, error)

AcquireShared creates a shared lock on a file for the duration of the process, or until Release(d). This method is reentrant.

func CheckLock

func CheckLock(path string) bool

CheckLock checks whether any process is using the lock

func Release

func Release(lock int) error

Release removes an existing lock held by this process.

Types

This section is empty.

Jump to

Keyboard shortcuts

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