MCPcopy
hub / github.com/tldraw/tldraw / push

Method push

packages/utils/src/lib/ExecutionQueue.ts:119–124  ·  view source on GitHub ↗

* Adds a task to the queue and returns a promise that resolves with the task's result. * * Enqueues a task for sequential execution. The task will be executed after all * previously queued tasks have completed. If a timeout was specified in the constructor, * there will be a delay between th

(task: () => T)

Source from the content-addressed store, hash-verified

117 * ```
118 */
119 async push<T>(task: () => T): Promise<Awaited<T>> {
120 return new Promise<Awaited<T>>((resolve, reject) => {
121 this.queue.push(() => Promise.resolve(task()).then(resolve).catch(reject))
122 this.run()
123 })
124 }
125
126 /**
127 * Clears all pending tasks from the queue.

Callers 15

limitFunction · 0.45
renderFunction · 0.45
mainFunction · 0.45
getHelpFunction · 0.45
wrapWordFunction · 0.45
execFunction · 0.45
throttle.test.tsFile · 0.45
fn1Function · 0.45
fn2Function · 0.45
fn3Function · 0.45
value.test.tsFile · 0.45

Calls 2

runMethod · 0.95
resolveMethod · 0.65

Tested by 15

fn1Function · 0.36
fn2Function · 0.36
fn3Function · 0.36
makeTableMutatorFunction · 0.36
homeStateFunction · 0.36
moveToMethod · 0.36
lineToMethod · 0.36
registerCallFunction · 0.36
onOperationCompleteMethod · 0.36
getClipPathMethod · 0.36
doMockClipboardFunction · 0.36
serializeParsedKbdFunction · 0.36