提交 b2e8dcc4 编写于 作者: I isidor

Revert #54397

This reverts commit a8e6a919.
上级 bdd4c664
......@@ -718,20 +718,16 @@ export class DebugService implements IDebugService {
// task is already running - nothing to do.
return Promise.resolve(null);
}
once(TaskEventKind.Active, this.taskService.onDidStateChange)(taskEvent => {
once(TaskEventKind.Active, this.taskService.onDidStateChange)((taskEvent) => {
// Task is active, so everything seems to be fine, no need to prompt after 10 seconds
// Use case being a slow running task should not be prompted even though it takes more than 10 seconds
if (taskEvent.taskId === task._id) {
taskStarted = true;
}
taskStarted = true;
});
const taskPromise = this.taskService.run(task);
if (task.isBackground) {
return new Promise((c, e) => once(TaskEventKind.Inactive, this.taskService.onDidStateChange)(taskEvent => {
if (taskEvent.taskId === task._id) {
taskStarted = true;
c(null);
}
return new Promise((c, e) => once(TaskEventKind.Inactive, this.taskService.onDidStateChange)(() => {
taskStarted = true;
c(null);
}));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册