* 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
()
| 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` |
no outgoing calls
no test coverage detected