MCPcopy
hub / github.com/caolan/async / _next

Function _next

lib/internal/queue.js:53–80  ·  view source on GitHub ↗
(tasks)

Source from the content-addressed store, hash-verified

51 }
52
53 function _next(tasks) {
54 return rest(function(args){
55 numRunning -= 1;
56
57 for (var i = 0, l = tasks.length; i < l; i++) {
58 var task = tasks[i];
59 var index = indexOf(workersList, task, 0);
60 if (index >= 0) {
61 workersList.splice(index)
62 }
63
64 task.callback.apply(task, args);
65
66 if (args[0] != null) {
67 q.error(args[0], task.data);
68 }
69 }
70
71 if (numRunning <= (q.concurrency - q.buffer) ) {
72 q.unsaturated();
73 }
74
75 if (q.idle()) {
76 q.drain();
77 }
78 q.process();
79 });
80 }
81
82 var isProcessing = false;
83 var q = {

Callers 1

queueFunction · 0.85

Calls 1

restFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…