Repository navigation
Release 0.1.14: let a runtime choose its workers' stack size - #17
Merged
Merged
Conversation
A worker's stack is where every task it polls runs, and Runtime had no way to size it: the threads took the std default, which is RUST_MIN_STACK when the process has it and two MiB when it does not. A caller whose tasks recurse deeply had to set that variable before launch, which makes a property of the runtime depend on whoever started the process. Runtime::builder() returns a Builder with workers, tuning, label and stack_size, and build() starts the threads. with_tuning now goes through it, so new, with_tuning and background() behave as before. A test runs a task with four MiB of locals on a runtime that asked for sixteen. Release as 0.1.14.
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
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.
Release 0.1.14:
Runtime::builder().stack_size(..), so a runtime can choose its workers' stack size.frontend 0.5.0 depends on it (its
parallelfeature and its timing example build pools with 16 MiB worker stacks, because a compiler session runs deep recursion on a worker). frontend can only publish once this is on crates.io: today it depends on thefeat/stack-sizegit branch, which crates.io refuses.This is
feat/stack-size(0a608af) cherry-picked onto current master, so history stays linear. It is one commit: the builder option, its docs, and the version bump to 0.1.14.Checked locally:
cargo test --releasepasses (every suite);cargo publish --dry-runpackages 0.1.14 cleanly (the three dead-code warnings are already on master).After merging:
cargo publishfor nagoya 0.1.14, then frontend's PR switches tonagoya = "^0.1.14".