MCPcopy Create free account
hub / github.com/Effect-TS/effect / shouldYield

Method shouldYield

packages/effect/src/Scheduler.ts:174–176  ·  view source on GitHub ↗

* Returns whether the fiber has reached its operation budget and should yield. * * **When to use** * * Use to decide whether a fiber should yield after consuming its current * operation budget. * * @since 2.0.0

(fiber: Fiber.Fiber<unknown, unknown>)

Source from the content-addressed store, hash-verified

172 * @since 2.0.0
173 */
174 shouldYield(fiber: Fiber.Fiber<unknown, unknown>) {
175 return fiber.currentOpCount >= fiber.maxOpsBeforeYield
176 }
177
178 /**
179 * Creates a dispatcher that schedules work through this scheduler.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected