feat(desktop): attest and manage the owned Windows host lifecycle
This commit is contained in:
@@ -58,6 +58,16 @@ export class EngineRunner {
|
||||
}
|
||||
return driver.job;
|
||||
}
|
||||
async stopAll() {
|
||||
for (const driver of this.drivers.values()) driver.run.controller.abort(new Error('用户停止执行宿主。'));
|
||||
for (const [id, driver] of [...this.drivers]) {
|
||||
await driver.close();
|
||||
if (driver.native && (!driver.job.native?.cleanup?.rootExited || driver.job.native?.cleanup?.treeConfirmed === false)) {
|
||||
throw engineError('所属原生引擎进程结束仍待核对,宿主保持运行。');
|
||||
}
|
||||
this.drivers.delete(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class EngineRunDriver {
|
||||
|
||||
Reference in New Issue
Block a user