Skip to content

xeoncross/goworkqueue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GoWorkQueue

Super simple single-node job queue with managed workers. Perfect for small jobs like digesting streams or simple crawl jobs.

No race conditions and has a graceful shutdown.

Install

go get github.com/xeoncross/goworkqueue

Usage

Create a new queue instance with a callback for each job you want run.

queue := goworkqueue.NewQueue(1000, 5, func(job interface{}, workerID int) {
  fmt.Println("Processing", job)
})
queue.Add("one")  // anything can add "jobs" to process
queue.Run()       // Blocks until queue.Close() is called

See the example/example.go for more information.

Released Free under the MIT license http://davidpennington.me

About

Super simple, concurrent worker queue in golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages