Revert "Don't allow multiple tasks runs to start at once"
This reverts commit 3c0e489746
.
This commit is contained in:
parent
30ae7bde85
commit
2c63153450
1 changed files with 2 additions and 4 deletions
|
@ -921,8 +921,6 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
|
|||
});
|
||||
}
|
||||
|
||||
// runTaskPromise is used for queueing calls to run so that we don't end up with the same task runnin
|
||||
private runTaskPromise: Promise<ITaskSummary | undefined> = Promise.resolve(undefined);
|
||||
public async run(task: Task | undefined, options?: ProblemMatcherRunOptions, runSource: TaskRunSource = TaskRunSource.System): Promise<ITaskSummary | undefined> {
|
||||
if (!(await this.trust())) {
|
||||
return;
|
||||
|
@ -932,7 +930,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
|
|||
throw new TaskError(Severity.Info, nls.localize('TaskServer.noTask', 'Task to execute is undefined'), TaskErrors.TaskNotFound);
|
||||
}
|
||||
|
||||
return this.runTaskPromise = this.runTaskPromise.then(() => new Promise<ITaskSummary | undefined>(async (resolve) => {
|
||||
return new Promise<ITaskSummary | undefined>(async (resolve) => {
|
||||
let resolver = this.createResolver();
|
||||
if (options && options.attachProblemMatcher && this.shouldAttachProblemMatcher(task) && !InMemoryTask.is(task)) {
|
||||
const toExecute = await this.attachProblemMatcher(task);
|
||||
|
@ -954,7 +952,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
|
|||
}, (error) => {
|
||||
this.handleError(error);
|
||||
return Promise.reject(error);
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
private isProvideTasksEnabled(): boolean {
|
||||
|
|
Loading…
Reference in a new issue