Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*options)
Option defines a functional option for the Pool.
func WithLogger ¶
WithLogger sets the logger for the pool to log panics if no PanicHandler is set.
func WithNonBlocking ¶
WithNonBlocking makes Submit return immediately with ErrPoolFull if the pool (queue) is full. Default is false (blocking).
func WithPanicHandler ¶
func WithPanicHandler(h func(interface{})) Option
WithPanicHandler sets a callback for when a worker panics. If set, this handler is called with the recover() result.
func WithQueueSize ¶
WithQueueSize sets the maximum number of queued tasks. If 0 or negative, it defaults to the pool size.
Click to show internal directories.
Click to hide internal directories.