Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job[T any] struct { // 工作函数,接受泛型参数 Func func(T) // 工作参数,类型为泛型 T Params T }
Job 结构体现在支持泛型
type StartWorker ¶
type StartWorker[T any] struct { // 最大运行数 MaxSize int `ini:"max_size"` WorkerPool chan chan Job[T] // contains filtered or unexported fields }
StartWorker 定义开始工作结构体,支持泛型
Click to show internal directories.
Click to hide internal directories.