1 var abort = require('./abort.js')
2 , async = require('./async.js')
6 module.exports = terminator;
9 * Terminates jobs in the attached state context
11 * @this AsyncKitState#
12 * @param {function} callback - final callback to invoke after termination
14 function terminator(callback)
16 if (!Object.keys(this.jobs).length)
21 // fast forward iteration index
22 this.index = this.size;
27 // send back results we have so far
28 async(callback)(null, this.results);