synckit

package
v0.259.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RWLocker

type RWLocker interface {
	sync.Locker
	RLock()
	RUnlock()
	RLocker() sync.Locker
}

type RWLockerFactory

type RWLockerFactory[K comparable] struct {
	// ReadOptimised will make RLocker and rsync perform much faster,
	// at the expense of having a global read locking when a read lock is made before a write locking.
	// This cause a side effect that acquiring write locks for other keys will hang until the read operation is done.
	//
	// In the end, this shortcut leads to a whopping <350% increase in read operation speed,
	// while also supporting write operations as well.
	// However, it causes only a 0.17% decrease in write speed performance.
	ReadOptimised bool
	// contains filtered or unexported fields
}

func (*RWLockerFactory[K]) RWLocker

func (l *RWLockerFactory[K]) RWLocker(key K) RWLocker

Jump to

Keyboard shortcuts

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