Sha256: aeecf0a3c9e141ba3f7711426438de2172521a92b37ec3157b04e1a38e337bd0
Contents?: true
Size: 533 Bytes
Versions: 91
Compression:
Stored size: 533 Bytes
Contents
var abort = require('./abort.js') , async = require('./async.js') ; // API module.exports = terminator; /** * Terminates jobs in the attached state context * * @this AsyncKitState# * @param {function} callback - final callback to invoke after termination */ function terminator(callback) { if (!Object.keys(this.jobs).length) { return; } // fast forward iteration index this.index = this.size; // abort jobs abort(this); // send back results we have so far async(callback)(null, this.results); }
Version data entries
91 entries across 89 versions & 22 rubygems