Skip to content

Are we able to document the default stack size for threads? #43805

Closed
@frewsxcv

Description

@frewsxcv

One can specify the stack size of a thread via thread::Builder::stack_size. If one does not use this method when building a thread, it uses some default value, which is specified in util::min_stack.

It looks like util::min_stack looks at the RUST_MIN_STACK env var and attempts to parse it into an integer. If it's not specified or can't parse, it falls back to 2MB.

Should we update the thread documentation to mention what the default stack size is and mention that environment variable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions