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

Method remove

packages/core/src/defer/idle_scheduler.ts:79–96  ·  view source on GitHub ↗
(callback: VoidFunction)

Source from the content-addressed store, hash-verified

77 }
78
79 remove(callback: VoidFunction) {
80 const key = this.callbackBucket.get(callback);
81 if (key === undefined) return;
82
83 this.callbackBucket.delete(callback);
84
85 const bucket = this.buckets.get(key);
86 if (!bucket) return;
87
88 bucket.queue.delete(callback);
89
90 // If the last callback in this bucket was removed, cancel the
91 // idle callback - cancel it.
92 if (bucket.queue.size === 0) {
93 this.cancelBucket(bucket);
94 this.buckets.delete(key);
95 }
96 }
97
98 private scheduleBucket(bucket: IdleBucket, options?: IdleRequestOptions) {
99 if (bucket.idleId !== null) {

Callers

nothing calls this directly

Calls 3

cancelBucketMethod · 0.95
getMethod · 0.65
deleteMethod · 0.45

Tested by

no test coverage detected