utils

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentTimeMs

func GetCurrentTimeMs() int64

func GetGoroutineId

func GetGoroutineId() int64

func GetRandomToken

func GetRandomToken() (string, error)

func GetUUID

func GetUUID() string

Types

type GoroutinePool

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

func NewGoroutinePool

func NewGoroutinePool(goroutineNum uint64) *GoroutinePool

func (*GoroutinePool) ShutdownNow

func (r *GoroutinePool) ShutdownNow()

ShutdownNow 尝试停止所有线程

func (*GoroutinePool) Submit

func (r *GoroutinePool) Submit(job func())

Submit 提交一个任务

Jump to

Keyboard shortcuts

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