package
Version:
v1.0.1
Opens a new window with list of versions in this module.
Published: Oct 14, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Pool accept the tasks from client,it limits the total
of goroutines to a given number by recycling goroutines.
NewPool generates a instance of ants pool
动态扩容或者缩小池容量
ReSize change the capacity of this pool
func (p *Pool) Submit(task functinType, str interface{}) error
Submit submit a task to pool
Worker is the actual executor who runs the tasks,
it starts a goroutine that accepts tasks and
performs function calls.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.