effect-io-ai

Package: effect
Module: Scheduler

Scheduler.PreventSchedulerYield

Context reference that controls whether the runtime should bypass scheduler yield checks. When set to true, the fiber run loop won’t call Scheduler.shouldYield.

When to use

Use to bypass scheduler yield checks for controlled runtime workloads where cooperative yielding should be disabled.

Gotchas

Setting this reference to true can let long-running fibers monopolize the JavaScript thread.

See

Signature

declare const PreventSchedulerYield: Context.Reference<boolean>

Source

Since v4.0.0