Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IORuntimeConfig: reject invalid auto-yield and cancelation check thresholds #3987

Merged

Conversation

durban
Copy link
Contributor

@durban durban commented Feb 2, 2024

There are 2 changes to IORuntimeConfig in this PR:

  • The important one is to reject invalid values for auto-yield and cancelation check thresholds:
    • Negative and zero values are obviously silly.
    • For auto-yield 1 is also incorrect, since that causes a fiber to always yield, and never make progress.
    • (The existing checks are as before.)
  • The less important things:
    • I've moved the check into the primary constructor, so that every code path goes through the checks (especially the copy methods).
    • Previously it threw AssertionErrors, but IllegalArgumentException seemed more appropriate.

@djspiewak djspiewak merged commit 737d8a4 into typelevel:series/3.5.x Feb 2, 2024
28 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants