MCPcopy Index your code
hub / github.com/angular/angular / onAbort

Function onAbort

packages/core/rxjs-interop/src/rx_resource.ts:81–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79 // Track the abort listener so it can be removed if the Observable completes (as a memory
80 // optimization).
81 const onAbort = () => {
82 aborted = true;
83 sub?.unsubscribe();
84 // Remove the listener immediately since unsubscribe won't trigger the subscription's
85 // error/complete handlers. This ensures the promise resolves and PendingTask is released.
86 params.abortSignal.removeEventListener('abort', onAbort);
87 // Resolve the promise with the current stream state if it hasn't been resolved yet.
88 // This ensures the PendingTask created for this request is released.
89 resolveOnce();
90 };
91 params.abortSignal.addEventListener('abort', onAbort);
92
93 function send(value: ResourceStreamItem<T>): void {

Callers

nothing calls this directly

Calls 3

resolveOnceFunction · 0.85
unsubscribeMethod · 0.65
removeEventListenerMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…