提交 e39d21e3 编写于 作者: A Alex Ross

Remove hack in terminal task system to delay disposal

This is no longer needed because #92868 is fixed

This reverts commit d6354443.
上级 c193076a
......@@ -167,7 +167,7 @@ import { window, tasks, Disposable, TaskDefinition, Task, EventEmitter, CustomEx
commands.executeCommand('workbench.action.tasks.runTask', `${taskType}: ${taskName}`);
});
test.skip('Execution from onDidEndTaskProcess is equal to original', () => {
test('Execution from onDidEndTaskProcess is equal to original', () => {
return new Promise(async (resolve, reject) => {
const task = new Task({ type: 'testTask' }, TaskScope.Workspace, 'echo', 'testTask', new ShellExecution('echo', ['hello test']));
let taskExecution: TaskExecution | undefined;
......@@ -194,7 +194,7 @@ import { window, tasks, Disposable, TaskDefinition, Task, EventEmitter, CustomEx
});
});
test.skip('Execution from onDidStartTaskProcess is equal to original', () => {
test('Execution from onDidStartTaskProcess is equal to original', () => {
return new Promise(async (resolve, reject) => {
const task = new Task({ type: 'testTask' }, TaskScope.Workspace, 'echo', 'testTask', new ShellExecution('echo', ['hello test']));
let taskExecution: TaskExecution | undefined;
......@@ -228,8 +228,10 @@ import { window, tasks, Disposable, TaskDefinition, Task, EventEmitter, CustomEx
private readonly writeEmitter = new EventEmitter<string>();
public readonly onDidWrite: Event<string> = this.writeEmitter.event;
public async close(): Promise<void> { }
private closeEmitter = new EventEmitter<void>();
onDidClose: Event<void> = this.closeEmitter.event;
public open(): void {
this.close();
this.closeEmitter.fire();
resolve();
}
}
......
......@@ -856,6 +856,7 @@ export class TerminalTaskSystem implements ITaskSystem {
});
promise = new Promise<ITaskSummary>((resolve, reject) => {
const onExit = terminal!.onExit((exitCode) => {
onData.dispose();
onExit.dispose();
let key = task.getMapKey();
this.removeFromActiveTasks(task);
......@@ -886,12 +887,8 @@ export class TerminalTaskSystem implements ITaskSystem {
// There is nothing else to do here.
}
}
// Hack to work around #92868 until terminal is fixed.
setTimeout(() => {
onData.dispose();
startStopProblemMatcher.done();
startStopProblemMatcher.dispose();
}, 100);
startStopProblemMatcher.done();
startStopProblemMatcher.dispose();
if (!processStartedSignaled && terminal) {
this._onDidStateChange.fire(TaskEvent.create(TaskEventKind.ProcessStarted, task, terminal.processId!));
processStartedSignaled = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册