Skip to content

A minimalistic Go package to setup a worker pool which accepts functions of signature `fn()` [not maintained]

License

Notifications You must be signed in to change notification settings

bnkamalesh/routinepool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gocover.run

Routinepool

Routinepool is a simple Go library to start a worker pool. The example provided in the test illustrates everything what this worker pool can do. e.g. See number of active jobs, pending jobs, stop worker pool etc.

  1. Start worker pool
  2. Push tasks/work to the pool
  3. See active number of tasks
  4. See pending tasks

Methods available

  1. New() - returns a new Pool pointer with all the configurations set, ready to be used
  2. p.Start() - starts the workerpool and waits for tasks to be pushed
  3. p.Push(<task>) - pushes a work/task to the queue
  4. p.Active() - returns the number of tasks which are actively running
  5. p.Pending() - returns the number of tasks which are pending in the queue
  6. p.Stop() - gracefully shutsdown the workerpool, i.e. waits for the queue to be empty and shutdown

About

A minimalistic Go package to setup a worker pool which accepts functions of signature `fn()` [not maintained]

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages