# README
JobQueue - Powerful unlimited job queue with goroutine pool
Installation
To install the package, run:
go get github.com/go-zoox/jobqueue
Getting Started
import (
"testing"
"github.com/go-zoox/jobqueue"
)
func main(t *testing.T) {
q := New(runtime.NumCPU())
q.Start()
defer q.Stop()
for i := 0; i < 10; i++ {
q.AddJob(&NewJob(func() {
fmt.Println("Process Job")
}))
}
}
Inspired by
- dirkaholic/kyoo - Unlimited job queue for go, using a pool of concurrent workers processing the job queue entries
Related
- go-zoox/cocurrent - A Simple Goroutine Limit Pool
- go-zoox/waitgroup - Parallel-Controlled WaitGroup
- go-zoox/promise - JavaScript Promise Like with Goroutines
License
GoZoox is released under the MIT License.
# Constants
JobStatusDone means the job has been processed.
JobStatusFailed means the job has failed to be processed.
JobStatusPending means the job is waiting to be processed.
JobStatusRunning means the job is being processed.
# Variables
Version is the current version of the package.
# Interfaces
Job interface for job processing.