Documentation
¶
Index ¶
- type WorkerPool
- func (wp *WorkerPool[T]) Await() <-chan struct{}
- func (wp *WorkerPool[T]) Range(tasks <-chan T) *WorkerPool[T]
- func (wp *WorkerPool[T]) WithContext(ctx context.Context) *WorkerPool[T]
- func (wp *WorkerPool[T]) WithHandler(h func(T)) *WorkerPool[T]
- func (wp *WorkerPool[T]) WithMaxGoroutines(n int) *WorkerPool[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WorkerPool ¶
type WorkerPool[T any] struct { // contains filtered or unexported fields }
func New ¶
func New[T any]() *WorkerPool[T]
func (*WorkerPool[T]) Await ¶
func (wp *WorkerPool[T]) Await() <-chan struct{}
func (*WorkerPool[T]) Range ¶
func (wp *WorkerPool[T]) Range(tasks <-chan T) *WorkerPool[T]
func (*WorkerPool[T]) WithContext ¶
func (wp *WorkerPool[T]) WithContext(ctx context.Context) *WorkerPool[T]
func (*WorkerPool[T]) WithHandler ¶
func (wp *WorkerPool[T]) WithHandler(h func(T)) *WorkerPool[T]
func (*WorkerPool[T]) WithMaxGoroutines ¶
func (wp *WorkerPool[T]) WithMaxGoroutines(n int) *WorkerPool[T]
Click to show internal directories.
Click to hide internal directories.