(callback)
| 4 | if (!counter) counter = {scheduled: 0}; |
| 5 | |
| 6 | function task(callback) { |
| 7 | if (deferrals) return deferrals.push({callback: callback, index: counter.scheduled++}); |
| 8 | try { |
| 9 | callback(null, {active: ++active, index: counter.scheduled++}); |
| 10 | } finally { |
| 11 | --active; |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | task.finish = function() { |
| 16 | var deferrals_ = deferrals.slice(); |
nothing calls this directly
no test coverage detected
searching dependent graphs…