MCPcopy
hub / github.com/vuejs/core / queuePostFlushCb

Function queuePostFlushCb

packages/runtime-core/src/scheduler.ts:125–140  ·  view source on GitHub ↗
(cb: SchedulerJobs)

Source from the content-addressed store, hash-verified

123}
124
125export function queuePostFlushCb(cb: SchedulerJobs): void {
126 if (!isArray(cb)) {
127 if (activePostFlushCbs && cb.id === -1) {
128 activePostFlushCbs.splice(postFlushIndex + 1, 0, cb)
129 } else if (!(cb.flags! & SchedulerJobFlags.QUEUED)) {
130 pendingPostFlushCbs.push(cb)
131 cb.flags! |= SchedulerJobFlags.QUEUED
132 }
133 } else {
134 // if cb is an array, it is a component lifecycle hook which can only be
135 // triggered by a job, which is already deduped in the main queue, so
136 // we can skip duplicate check here to improve perf
137 pendingPostFlushCbs.push(...cb)
138 }
139 queueFlush()
140}
141
142export function flushPreFlushCbs(
143 instance?: ComponentInternalInstance,

Callers 10

useCssVarsFunction · 0.90
reloadFunction · 0.90
resolveFunction · 0.90
queueEffectWithSuspenseFunction · 0.90
scheduler.spec.tsFile · 0.90
cb1Function · 0.90
job1Function · 0.90
job2Function · 0.90
cbFunction · 0.90
queueAndFlushFunction · 0.90

Calls 2

queueFlushFunction · 0.85
pushMethod · 0.65

Tested by 5

cb1Function · 0.72
job1Function · 0.72
job2Function · 0.72
cbFunction · 0.72
queueAndFlushFunction · 0.72