MCPcopy Index your code
hub / github.com/Effect-TS/effect / shouldYield

Function shouldYield

packages/effect/src/Scheduler.ts:276–284  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

274 const index = record.sort(([p0], [p1]) => p0 < p1 ? -1 : p0 > p1 ? 1 : 0)
275 return {
276 shouldYield(fiber) {
277 for (const scheduler of record) {
278 const priority = scheduler[1].shouldYield(fiber)
279 if (priority !== false) {
280 return priority
281 }
282 }
283 return false
284 },
285 scheduleTask(task, priority, fiber) {
286 let scheduler: Scheduler | undefined = undefined
287 for (const i of index) {

Callers

nothing calls this directly

Calls 1

shouldYieldMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…