MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / yieldToEventLoop

Method yieldToEventLoop

packages/db/src/buffers/base-buffer.ts:132–134  ·  view source on GitHub ↗

* Yield control back to the event loop. Use periodically inside CPU-bound * loops (parse / merge / sort over N items) so other awaiters — incoming * add() calls, BullMQ heartbeats, the /healthz endpoint — can make * progress instead of waiting hundreds of milliseconds for the loop to * m

()

Source from the content-addressed store, hash-verified

130 * not every iteration.
131 */
132 protected yieldToEventLoop(): Promise<void> {
133 return new Promise((resolve) => setImmediate(resolve));
134 }
135
136 /**
137 * Compute how often to yield in a CPU-bound loop over `batchSize`

Callers 2

processBufferMethod · 0.80
processBufferMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected