lock

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DSListLockToken

type DSListLockToken interface {
	// contains filtered or unexported methods
}

DSListLockToken represents proof that a list lock has been acquired

type DSListLocker

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

DSListLocker

func (*DSListLocker) AsyncLock added in v1.1.0

func (r *DSListLocker) AsyncLock() (DSListLockToken, chan<- DSListLockToken)

AsyncLock acquires a lock until the token is returned to the receiving channel

func (*DSListLocker) RLock

func (r *DSListLocker) RLock()

RLock acquires a read lock

func (*DSListLocker) RUnlock

func (r *DSListLocker) RUnlock()

RLock releases a read lock

func (*DSListLocker) WithLock

func (r *DSListLocker) WithLock(f func(l DSListLockToken))

WithLock acquires a lock for the duration that the provided function is being executed. A token as proof of the lock is passed to the function.

Jump to

Keyboard shortcuts

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