(q, i)
| 71 | } |
| 72 | |
| 73 | function end(q, i) { |
| 74 | return function(e, r) { |
| 75 | if (!q._tasks[i]) return; // ignore multiple callbacks |
| 76 | --q._active, ++q._ended; |
| 77 | q._tasks[i] = null; |
| 78 | if (q._error != null) return; // ignore secondary errors |
| 79 | if (e != null) { |
| 80 | abort(q, e); |
| 81 | } else { |
| 82 | q._data[i] = r; |
| 83 | if (q._waiting) poke(q); |
| 84 | else maybeNotify(q); |
| 85 | } |
| 86 | }; |
| 87 | } |
| 88 | |
| 89 | function abort(q, e) { |
| 90 | var i = q._tasks.length, t; |
no test coverage detected