package
1.5.8
Repository: https://github.com/sllt/tao.git
Documentation: pkg.go.dev

# Functions

Cap returns the capacity of this default pool.
Free returns the available goroutines to work.
NewPool generates an instance of ants pool.
NewPoolWithFunc generates an instance of ants pool with a specific function.
Reboot reboots the default pool.
Release Closes the default pool.
Running returns the number of the currently running goroutines.
Submit submits a task to pool.
WithExpiryDuration sets up the interval time of cleaning up goroutines.
WithLogger sets up a customized logger.
WithMaxBlockingTasks sets up the maximum number of goroutines that are blocked when it reaches the capacity of pool.
WithNonblocking indicates that pool will return nil when there is no available workers.
WithOptions accepts the whole options config.
WithPanicHandler sets up panic handler.
WithPreAlloc indicates whether it should malloc for workers.

# Constants

CLOSED represents that the pool is closed.
DefaultCleanIntervalTime is the interval time to clean up goroutines.
DefaultPoolSize is the default capacity for a default goroutine pool.
OPENED represents that the pool is opened.

# Variables

ErrInvalidPoolExpiry will be returned when setting a negative number as the periodic duration to purge goroutines.
ErrInvalidPreAllocSize will be returned when trying to set up a negative capacity under PreAlloc mode.
ErrLackPoolFunc will be returned when invokers don't provide function for pool.
ErrPoolClosed will be returned when submitting task to a closed pool.
ErrPoolOverload will be returned when the pool is full and no workers available.

# Structs

Options contains all options which will be applied when instantiating an ants pool.
Pool accepts the tasks from client, it limits the total of goroutines to a given number by recycling goroutines.
PoolWithFunc accepts the tasks from client, it limits the total of goroutines to a given number by recycling goroutines.

# Type aliases

Option represents the optional function.