ctxmu

package
v0.0.0-...-9fdd194 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CtxLocker

type CtxLocker interface {
	Lock(ctx context.Context) (err error)
	Unlock()
}

type CtxRWLocker

type CtxRWLocker interface {
	CtxLocker
	RLock(ctx context.Context) (err error)
	RUnlock()
}

type CtxRWMutex

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

func (*CtxRWMutex) Lock

func (c *CtxRWMutex) Lock(ctx context.Context) error

func (*CtxRWMutex) RLock

func (c *CtxRWMutex) RLock(ctx context.Context) (err error)

func (*CtxRWMutex) RUnlock

func (c *CtxRWMutex) RUnlock()

func (*CtxRWMutex) Unlock

func (c *CtxRWMutex) Unlock()

type MultiCtxLocker

type MultiCtxLocker interface {
	Lock(ctx context.Context, key interface{}) (err error)
	Unlock(key interface{})
}

type MultiCtxRWLocker

type MultiCtxRWLocker interface {
	MultiCtxLocker
	RLock(ctx context.Context, key interface{}) (err error)
	RUnlock(key interface{})
}

type MultiCtxRWMutex

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

func NewDefaultMultiCtxRWMutex

func NewDefaultMultiCtxRWMutex() *MultiCtxRWMutex

func NewMultiCtxRWMutex

func NewMultiCtxRWMutex(newCtxRWLock func() CtxRWLocker) *MultiCtxRWMutex

func (*MultiCtxRWMutex) Lock

func (m *MultiCtxRWMutex) Lock(ctx context.Context, key interface{}) (err error)

func (*MultiCtxRWMutex) LockWithTimout

func (m *MultiCtxRWMutex) LockWithTimout(timeout time.Duration, key interface{}) (err error)

func (*MultiCtxRWMutex) RLock

func (m *MultiCtxRWMutex) RLock(ctx context.Context, key interface{}) (err error)

func (*MultiCtxRWMutex) RLockWithTimout

func (m *MultiCtxRWMutex) RLockWithTimout(timeout time.Duration, key interface{}) (err error)

func (*MultiCtxRWMutex) RUnlock

func (m *MultiCtxRWMutex) RUnlock(key interface{})

func (*MultiCtxRWMutex) Unlock

func (m *MultiCtxRWMutex) Unlock(key interface{})

Jump to

Keyboard shortcuts

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