Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Future ¶
type Future struct {
// contains filtered or unexported fields
}
Future holds the result of an asynchronous task.
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool is a fixed-size worker pool for concurrent task execution.
func NewPool ¶
NewPool creates a fixed-size worker pool of n goroutines.
Example:
pool := worker.NewPool(4)
defer pool.Shutdown()
pool.Submit(func(ctx context.Context) error {
return doWork(ctx)
})
Click to show internal directories.
Click to hide internal directories.