flock

package
v0.0.0-...-ca78c08 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 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