MCPcopy
hub / github.com/microsoft/vscode-js-debug / _terminateOrphanThreads

Method _terminateOrphanThreads

src/binder.ts:499–505  ·  view source on GitHub ↗

* Terminates all targets in the tree that aren't in the `targets` list.

(
    targets: ITarget[],
    terminateArgs?: Dap.TerminatedEventParams,
  )

Source from the content-addressed store, hash-verified

497 * Terminates all targets in the tree that aren't in the `targets` list.
498 */
499 private async _terminateOrphanThreads(
500 targets: ITarget[],
501 terminateArgs?: Dap.TerminatedEventParams,
502 ) {
503 const toRelease = [...this._root.all()].filter(n => !targets.includes(n.value));
504 return Promise.all(toRelease.map(n => this._markTargetAsTerminated(n, terminateArgs)));
505 }
506
507 /**
508 * Marks the target as terminated, called when the target lists change.

Callers 2

BinderClass · 0.95
disposeMethod · 0.95

Calls 4

allMethod · 0.80
mapMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected