Versions in this module Expand all Collapse all v1 v1.5.1 Feb 15, 2026 Changes in this version + type Config struct + QueueSize int + TaskTimeout time.Duration + WorkerCount int + type Pool interface + QueueSize func() int + Results func() <-chan Result + Shutdown func() <-chan struct{} + Size func() int + Submit func(task Task) error + SubmitWithContext func(ctx context.Context, task Task) error + func New(workerCount, queueSize int) Pool + func NewSafe(workerCount, queueSize int) (Pool, error) + func NewWithConfig(config Config) Pool + func NewWithConfigSafe(config Config) (Pool, error) + type Result struct + Duration time.Duration + Error error + Task Task + WorkerID int + type Task interface + Execute func(ctx context.Context) error + type TaskFunc func(ctx context.Context) error + func (f TaskFunc) Execute(ctx context.Context) error