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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, maybe this is a nitpick but the Windows comment isn't strictly accurate. The default size is linker-defined, which does (on MSVC at least) use 1MiB if not otherwise set but it can be different. So saying 0 means 1MiB on Windows is not necessarily true even now and in the future Rust might opt to use a different value by default.
That said, I'm not sure it's worth going on about
/stack
here, Maybe it's acceptable to say "1MiB" in a lies to children kind of way.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's basically the emotional arc I went through. I was sorely tempted to specify "usually" or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair. I'm a little bit uncomfortable with std docs that aren't technically correct but it is truthish and it does make sense to mention the 1MiB somewhere as it's something that does trip up cross-platform code (admittedly mostly for the main thread rather than spawning new ones but still).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I posted a couple of suggestions improving this to be more accurate. (The resulting comments need word-wrapping after applying the suggestions.)