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

Function scheduler

packages/reactivity/__tests__/watch.spec.ts:21–28  ·  view source on GitHub ↗
(job, isFirstRun)

Source from the content-addressed store, hash-verified

19 fn ? resolvedPromise.then(fn) : resolvedPromise
20
21const scheduler: WatchScheduler = (job, isFirstRun) => {
22 if (isFirstRun) {
23 job()
24 } else {
25 queue.push(job)
26 flushJobs()
27 }
28}
29
30const flushJobs = () => {
31 if (isFlushPending) return

Callers 1

watchFunction · 0.85

Calls 3

flushJobsFunction · 0.70
pushMethod · 0.65
jobFunction · 0.50

Tested by

no test coverage detected