Skip to content

Repository files navigation

queue

Task (function) queue with concurrency / timeout control.

Installation

$ component install component/queue

Example

varrequest=require('superagent');varQueue=require('queue');varq=newQueue({concurrency: 3,timeout: 3000});varurls=['http://google.com','http://yahoo.com','http://ign.com','http://msn.com','http://hotmail.com','http://cloudup.com','http://learnboost.com'];urls.forEach(function(url){q.push(function(fn){console.log('%s',url);request.get(url,function(res){console.log('%s -> %s',url,res.status);fn();});});});

License

MIT

About

function job queue with concurrency and timeout support

Resources

Stars

24 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages