Skip to content

like async.queue, but tasks are named and de-duplicated

License

Notifications You must be signed in to change notification settings

Ivshti/named-queue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

named-queue

like async.queue, but tasks are named and de-duplicated

Init

var namedQueue = require('named-queue')

var queue = new namedQueue(processor, concurrency)

processor - function(task, cb)

concurrency - Number for maximum concurrent tasks; can be Infinity

Methods

WARNING All tasks must have an .id property used to identify and avoid doing the same task more than once at a time

queue.push(task, cb)

queue.unshift(task, cb)

queue.length()

About

like async.queue, but tasks are named and de-duplicated

Resources

License

Stars

Watchers

Forks

Packages

No packages published