lock

package
v0.0.0-...-1b3fcde Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTsLockPool

func NewTsLockPool() *_tsLockPool

Types

type Await

type Await[T any] struct {
	// contains filtered or unexported fields
}

*******************************************************

func NewAwait

func NewAwait[T any](muxlimit int) *Await[T]

func (*Await[T]) DelAndClose

func (this *Await[T]) DelAndClose(idx int64)

func (*Await[T]) DelAndPut

func (this *Await[T]) DelAndPut(idx int64, v T)

func (*Await[T]) Get

func (this *Await[T]) Get(idx int64) (ch chan T)

type LimitLock

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

*******************************************************

func NewLimitLock

func NewLimitLock(limit int, timeout time.Duration) (_r *LimitLock)

func (*LimitLock) Cc

func (this *LimitLock) Cc() int64

concurrency num

func (*LimitLock) Lock

func (this *LimitLock) Lock() (err error)

func (*LimitLock) LockCount

func (this *LimitLock) LockCount() int64

func (*LimitLock) Unlock

func (this *LimitLock) Unlock()

type Numlock

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

func NewNumLock

func NewNumLock(muxNum int) *Numlock

func (*Numlock) Lock

func (this *Numlock) Lock(key int64)

func (*Numlock) Unlock

func (this *Numlock) Unlock(key int64)

type Strlock

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

***************************************************

func NewStrlock

func NewStrlock(muxNum int) *Strlock

func (*Strlock) Lock

func (this *Strlock) Lock(key string)

func (*Strlock) RLock

func (this *Strlock) RLock(key string)

func (*Strlock) RUnlock

func (this *Strlock) RUnlock(key string)

func (*Strlock) Unlock

func (this *Strlock) Unlock(key string)

type TlLock

type TlLock[T any] interface {
	Lock(key T)
	UnLock(key T)
}

type TsLock

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

*******************************************************

func (*TsLock) GetKey

func (this *TsLock) GetKey() []string

func (*TsLock) Lock

func (this *TsLock) Lock()

func (*TsLock) UnLock

func (this *TsLock) UnLock()

Jump to

Keyboard shortcuts

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