fix(core): update

This commit is contained in:
2019-11-27 23:34:45 +00:00
parent ea1f434cdd
commit f275f7e2f6
4 changed files with 321 additions and 96 deletions

View File

@@ -3,14 +3,14 @@ import * as helpers from './taskbuffer.classes.helpers';
import { Task } from './taskbuffer.classes.task';
export class Taskparallel extends Task {
taskArray: Task[];
public taskArray: Task[];
constructor(optionsArg: { taskArray: Task[] }) {
const options = {
...optionsArg,
...{
taskFunction: () => {
let done = plugins.smartpromise.defer();
let promiseArray: Promise<any>[] = []; // stores promises of all tasks, since they run in parallel
const done = plugins.smartpromise.defer();
const promiseArray: Promise<any>[] = []; // stores promises of all tasks, since they run in parallel
this.taskArray.forEach(function(taskArg) {
promiseArray.push(taskArg.trigger());
});