Package: effect
Module: References
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
MaxOpsBeforeYield for tuning the operation budget while keeping scheduler yield checks enabledSignature
declare const PreventSchedulerYield: Context.Reference<boolean>
Since v4.0.0