utils

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*defaultWorkerPool)

func WithPanicHandler

func WithPanicHandler(handler func(any)) Option

WithPanicHandler 允许用户自定义 panic 处理逻辑

type WorkerPool

type WorkerPool interface {
	Execute(task func())
	Wait()
}

WorkerPool 控制并发任务的执行

func NewWorkerPool

func NewWorkerPool(maxConcurrent uint, options ...Option) WorkerPool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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