workerpool

package
v1.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QueuedConfig

type QueuedConfig struct {
	Workers   int
	QueueSize int
}

type QueuedPool

type QueuedPool struct {
	// contains filtered or unexported fields
}

func NewQueued

func NewQueued(config QueuedConfig) *QueuedPool

func NewQueuedWithLogger

func NewQueuedWithLogger(config QueuedConfig, logger *slog.Logger) *QueuedPool

NewQueuedWithLogger는 panic recover 로그에 사용할 logger를 주입한다. logger가 nil이면 slog.Default()를 사용한다.

func (*QueuedPool) Pending

func (p *QueuedPool) Pending() int

func (*QueuedPool) QueueSize

func (p *QueuedPool) QueueSize() int

func (*QueuedPool) StopAndWait

func (p *QueuedPool) StopAndWait()

func (*QueuedPool) StopAndWaitContext

func (p *QueuedPool) StopAndWaitContext(ctx context.Context) error

func (*QueuedPool) SubmitWait

func (p *QueuedPool) SubmitWait(task func()) bool

func (*QueuedPool) TrySubmit

func (p *QueuedPool) TrySubmit(task func()) bool

func (*QueuedPool) Workers

func (p *QueuedPool) Workers() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL