pool

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: MulanPSL-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 GroutingPool

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

协程池 @author fuzeyu

func (*GroutingPool) Init

func (this *GroutingPool) Init(total int, limit time.Duration) *GroutingPool

初始化 @param total 协程池总长度 @param limit 下次分发协程的间隔时间

func (*GroutingPool) Next

func (this *GroutingPool) Next()

获取下一次协程池

func (*GroutingPool) Remand

func (this *GroutingPool) Remand()

归还协程

type PrefixMutex

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

自定义线程锁 @author fuzeyu

func (*PrefixMutex) Init

func (this *PrefixMutex) Init(clearSeconds int) *PrefixMutex

初始化 @param clearSeconds 锁的清理时间

func (*PrefixMutex) Lock

func (this *PrefixMutex) Lock(prefix string)

获取锁 @param prefix 锁内容

func (*PrefixMutex) UnLock

func (this *PrefixMutex) UnLock(prefix string)

解锁 @param prefix 锁内容

Jump to

Keyboard shortcuts

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