package
Version:
v0.0.0-...-bc1b0c2
Opens a new window with list of versions in this module.
Published: Sep 13, 2024
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.