Skip to content

Commit

Permalink
Fixes #24670: Add API to determine if the task service supports paral…
Browse files Browse the repository at this point in the history
…lel task execution.
  • Loading branch information
dbaeumer committed May 30, 2018
1 parent c562bd2 commit cf13399
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/vs/workbench/parts/tasks/common/taskService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export interface TaskFilter {
export interface ITaskService {
_serviceBrand: any;
onDidStateChange: Event<TaskEvent>;
supportsMultipleTaskExecutions: boolean;

configureAction(): Action;
build(): TPromise<ITaskSummary>;
runTest(): TPromise<ITaskSummary>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,10 @@ class TaskService implements ITaskService {
return this._onDidStateChange.event;
}

public get supportsMultipleTaskExecutions(): boolean {
return this.inTerminal();
}

private registerCommands(): void {
CommandsRegistry.registerCommand('workbench.action.tasks.runTask', (accessor, arg) => {
this.runTaskCommand(accessor, arg);
Expand Down

0 comments on commit cf13399

Please sign in to comment.