mutx

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobalLocks

type GlobalLocks struct {
	// contains filtered or unexported fields
}

GlobalLocks All operations on the local disk need to be performed sequentially

func NewGlobalLocks

func NewGlobalLocks() *GlobalLocks

NewGlobalLocks returns new GlobalLocks.

func (*GlobalLocks) Release

func (gl *GlobalLocks) Release(Id string)

Release deletes the lock on Id.

func (*GlobalLocks) TryAcquire

func (gl *GlobalLocks) TryAcquire(Id string) bool

TryAcquire tries to acquire the lock for operating on Id and returns true if successful. If another operation is already using Id, returns false.

Jump to

Keyboard shortcuts

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