MCPcopy Index your code
hub / github.com/microsoft/vscode-js-debug / CombinedProgram

Class CombinedProgram

src/targets/node/program.ts:33–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 * stop. If one program stops, the other is also stopped automatically.
32 */
33export class CombinedProgram implements IProgram {
34 public readonly stopped = Promise.race([
35 this.a.stopped.then(async r => (await this.b.stop()) && r),
36 this.b.stopped.then(async r => (await this.a.stop()) && r),
37 ]);
38
39 constructor(private readonly a: IProgram, private readonly b: IProgram) {}
40
41 public gotTelemetery(telemetry: IProcessTelemetry) {
42 this.a.gotTelemetery(telemetry);
43 this.b.gotTelemetery(telemetry);
44 }
45
46 public async stop(): Promise<IStopMetadata> {
47 const r = await Promise.all([this.a.stop(), this.b.stop()]);
48 return r[0];
49 }
50}
51
52/**
53 * Program created from a subprocess.

Callers

nothing calls this directly

Calls 1

stopMethod · 0.65

Tested by

no test coverage detected