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

Method removeFromQueue

packages/core/src/defer/timer_scheduler.ts:106–121  ·  view source on GitHub ↗
(target: Array<number | VoidFunction>, callback: VoidFunction)

Source from the content-addressed store, hash-verified

104 }
105
106 private removeFromQueue(target: Array<number | VoidFunction>, callback: VoidFunction) {
107 let index = -1;
108 for (let i = 0; i < target.length; i += 2) {
109 const queuedCallback = target[i + 1];
110 if (queuedCallback === callback) {
111 index = i;
112 break;
113 }
114 }
115 if (index > -1) {
116 // Remove 2 elements: a timestamp slot and
117 // the following slot with a callback function.
118 arraySplice(target, index, 2);
119 }
120 return index;
121 }
122
123 private scheduleTimer(ngZone: NgZone) {
124 const callback = () => {

Callers 1

removeMethod · 0.95

Calls 1

arraySpliceFunction · 0.90

Tested by

no test coverage detected