403
return;
404
}
406
>
// Each session has its own pipeline so events from multiple sessions
407
>
// can be streamed concurrently.
408
>
const existingCts = this._invocationCts.get(sessionResource);
409
>
if (existingCts) {
410
existingCts.cancel();
411
existingCts.dispose();
412
}
414
>
// Mark provider events for this session to be cleared before the next
415
>
// batch is applied. The clear is deferred to addProviderEvent so that a
416
>
// provider returning nothing this cycle preserves the current events;
417
>
// see _pendingProviderClear.
418
>
this._pendingProviderClear.set(sessionResource, true);
419
>
420
>
const cts = new CancellationTokenSource();
421
>
this._invocationCts.set(sessionResource, cts);
422
>
423
>
try {
424
>
const promises = [...this._providers].map(provider =>
425
>
this._invokeProvider(provider, sessionResource, cts.token)
426
>
);
427
>
await Promise.allSettled(promises);
428
>
} catch (err) {
429
onUnexpectedError(err);
430
}