<commit_before>'use strict';

const Promise = require('bluebird');
const co = Promise.coroutine;
const READY = '_ready';

const defs = {
	src: null,
	val: null
};

module.exports = co(function * (tasks, opts) {
	// ensure is intialized first
	if (!this[READY]) {
		yield this.init();
	}

	// ensure base task options. (all receive the same)
	opts = Object.assign({}, defs, opts);

	try {
		// attempt to spawn all
		yield Promise.all(tasks.map(t => this.start(t, opts)));
		// @todo: emit event
		console.log('parallel chain complete!');
	} catch (e) {
		console.info('--- parallel knew there was an error, do nothing');
	}
});
<commit_msg>simplify fly.parallel; no need for default options - handled within fly.start<commit_after>'use strict';

const Promise = require('bluebird');
const co = Promise.coroutine;
const READY = '_ready';

module.exports = co(function * (tasks, opts) {
	// ensure is intialized first
	if (!this[READY]) {
		yield this.init();
	}

	try {
		// attempt to spawn all
		yield Promise.all(tasks.map(t => this.start(t, opts)));
		// @todo: emit event
		console.log('parallel chain complete!');
	} catch (e) {
		console.info('--- parallel knew there was an error, do nothing');
	}
});

{'fraction_non_alphanumeric': 0.16129032258064516, 'fraction_numerical': 0.0, 'mean_word_length': 3.7450980392156863, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3472933', 'n_tokens_mistral': 415, 'n_tokens_neox': 398, 'n_words': 125}