-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Default execution context is now parallel (MT:1) #16136
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
Merged
straight-shoota
merged 5 commits into
crystal-lang:master
from
ysbaddaden:feature/default-context-is-now-parallel-1
Sep 15, 2025
Merged
Default execution context is now parallel (MT:1) #16136
straight-shoota
merged 5 commits into
crystal-lang:master
from
ysbaddaden:feature/default-context-is-now-parallel-1
Sep 15, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2d59b47 to
99a9e51
Compare
mverzilli
approved these changes
Sep 6, 2025
Co-authored-by: Johannes Müller <[email protected]>
Sija
reviewed
Sep 9, 2025
straight-shoota
approved these changes
Sep 9, 2025
This was referenced Oct 27, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since the concurrent context doesn't exhibit any performance improvement over the parallel context (see #16135) and that we can resize a parallel context (see #15956), we can make the default execution context parallel and set the parallelism to 1 (aka MT:1) by default.
By default the parallelism would be disabled and the execution context remain concurrent only, which is backward compatible (nothing changes).
Resizing the context to enable parallelism will be at the discretion of the application: it can keep using the
CRYSTAL_WORKERSenvironment variable, and/or fallback to the number of CPUs or use a hardcoded value, and/or provide a command line argument, or anything else.