effect-io-ai

Package: effect
Module: References

References.PreventSchedulerYield

Context reference for whether the runtime bypasses scheduler yield checks.

When to use

Use to bypass automatic scheduler yield checks in a controlled runtime scope where throughput is preferred over scheduler fairness.

Details

When set to true, the fiber run loop skips Scheduler.shouldYield. The default value is false.

Gotchas

Disabling automatic yield checks can let long-running fibers monopolize the JavaScript thread.

See

Signature

declare const PreventSchedulerYield: Context.Reference<boolean>

Source

Since v4.0.0