MCPcopy Create free account
hub / github.com/ReactiveX/rxjs / #enqueue

Method #enqueue

packages/test/src/virtual-time.ts:424–440  ·  view source on GitHub ↗
(task: Omit<TaskRecord, 'order'>)

Source from the content-addressed store, hash-verified

422 }
423
424 #enqueue(task: Omit<TaskRecord, 'order'>): void {
425 if (task.dueTime < 0) {
426 // Negative hot messages are useful only as pre-zero subject history.
427 // They still execute before time-zero subscriptions.
428 }
429 this.#tasks.push({
430 ...task,
431 order: ++this.#nextOrder,
432 });
433 this.#tasks.sort((left, right) => {
434 if (left.dueTime !== right.dueTime) {
435 return left.dueTime - right.dueTime;
436 }
437 const priorityDifference = taskPriority[left.kind] - taskPriority[right.kind];
438 return priorityDifference || left.order - right.order;
439 });
440 }
441
442 #peekNextActiveTask(): TaskRecord | undefined {
443 let first = this.#tasks[0];

Callers 5

#scheduleAtMethod · 0.95
configureAnimationMethod · 0.95
configureIdleMethod · 0.95
#enqueueTimerMethod · 0.95
#installImmediateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected