queue alternatives and similar packages
Based on the "Goroutines" category.
Alternatively, view queue alternatives based on common mentions on social networks and blogs.
-
semaphore
Semaphore pattern implementation with timeout of lock/unlock operations based on channel and context. -
Hunch
Hunch provides functions like: All, First, Retry, Waterfall etc., that makes asynchronous flow control more intuitive. -
goccm
Go Concurrency Manager package limits the number of goroutines that allowed to run concurrently. -
conexec
A concurrent toolkit to help execute funcs concurrently in an efficient and safe way.It supports specifying the overall timeout to avoid blocking and uses goroutine pool to improve efficiency. -
go-tools/multithreading
Manage a pool of goroutines using this lightweight library with a simple API. -
hands
A process controller used to control the execution and return strategies of multiple goroutines. -
concurrency-limiter
Concurrency limiter with support for timeouts , dynamic priority and context cancellation of goroutines. -
oversight
Oversight is a complete implementation of the Erlang supervision trees.
Get performance insights in less than 4 minutes
Do you think we are missing an alternative of queue or a related project?
Popular Comparisons
README
queue
-- import "github.com/anikhasibul/queue"
package queue gives you a queue group accessibility. Helps you to limit goroutines, wait for the end of the all goroutines and much more...
maxRoutines := 50
q := queue.New(maxRoutines)
defer q.Close()
for i := 0; i != 1000; i++ {
q.Add()
go func(c int) {
defer q.Done()
fmt.Println(c)
}(i)
}
//wait for the end of the all jobs
q.Wait()
Usage
type Q
type Q struct {
}
Q holds a queue group and it's essentials.
func New
func New(max int) *Q
New creates a new queue group. It takes max running jobs as a parameter.
func (*Q) Add
func (q *Q) Add()
Add adds a new job to the queue.
func (*Q) Done
func (q *Q) Done()
Done decrements the queue group counter.
func (*Q) Wait
func (q *Q) Wait()
Wait waits for the end of the all jobs.
func (*Q) Current
func (q *Q) Current() int
Current returns the number of current running jobs.
func (*Q) Close
func (q *Q) Close()
Close closes a queue group gracefully.