async的"queue"方法的第二个参数的作用是什么?
What is the purpose of the second parameter of the "queue" method of async?
在 async
的 queue
方法的语法中有第二个参数,如本例所示:
var q = async.queue(function (task, callback)
{
console.log('hello ' + task.name);
callback();
}
, 2);
第二个参数代表什么?
并发性,取自文档 "for determining how many worker functions should be run in parallel." 基本上一次 运行 有多少函数
在 async
的 queue
方法的语法中有第二个参数,如本例所示:
var q = async.queue(function (task, callback)
{
console.log('hello ' + task.name);
callback();
}
, 2);
第二个参数代表什么?
并发性,取自文档 "for determining how many worker functions should be run in parallel." 基本上一次 运行 有多少函数