package
Version:
v1.4.28
Opens a new window with list of versions in this module.
Published: Sep 7, 2023
License: BSD-3-Clause
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Job is a function for doing jobs.
type Pool struct {
JobQueue chan Job
WorkerQueue chan *Worker
}
Pool is goroutine pool config.
func NewPool(numWorkers int, jobQueueLen int) *Pool
NewPool news goroutine pool
Release : release all workers
type Worker struct {
WorkerQueue chan *Worker
JobChannel chan Job
Stop chan struct{}
}
Worker goroutine struct.
Start : start goroutine pool.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.