proxy.golang.org : github.com/goinggo/jobpool
Package jobpool implements a pool of go routines that are dedicated to processing jobs posted into the pool. The jobpool maintains two queues, a normal processing queue and a priority queue. Jobs placed in the priority queue will be processed ahead of pending jobs in the normal queue. If priority is not required, using ArdanStudios/workpool is faster and more efficient. The following is a list of parameters for creating a JobPool: Go routines are used to manage and process all the jobs. A single Queue routine provides the safe queuing of work. The Queue routine keeps track of the number of jobs in the queue and reports an error if the queue is full. The numberOfRoutines parameter defines the number of job routines to create. These job routines will process work subbmitted to the queue. The job routines keep track of the number of active job routines for reporting. The QueueJob method is used to queue a job into one of the two queues. This call will block until the Queue routine reports back success or failure that the job is in queue. The following shows a simple test application The following shows some sample output
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/goinggo/jobpool
License: BSD-1-Clause
Latest release: almost 11 years ago
First release: almost 11 years ago
Namespace: github.com/goinggo
Stars: 5 on GitHub
Forks: 2 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 27 days ago