Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrWorkerClosed = errors.New("worker: worker closed")
)
Functions ¶
func WithCapacity ¶
func WithCapacity(capacity int) funcOption
func WithProcessNum ¶
func WithProcessNum(num int) funcOption
func WithStartHandler ¶
func WithStartHandler(f func()) funcOption
func WithStopHandler ¶
func WithStopHandler(f func()) funcOption
Types ¶
type Async ¶
type Async interface { Submit(task TaskHandler) SeqSubmit(id string, task TaskHandler) }
type TaskHandler ¶
type TaskHandler func()
Click to show internal directories.
Click to hide internal directories.