* Terminates all targets in the tree that aren't in the `targets` list.
(
targets: ITarget[],
terminateArgs?: Dap.TerminatedEventParams,
)
| 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. |