Skip to content

Make std::env::{Args, ArgsOs} Send and Sync #118700

Open
@SteveLauC

Description

@SteveLauC

#48004 requests to make these 2 types !Send and !Sync and #48005 implements it.

From this comment, at that time, they were really not Send and Sync, but now, it seems both Unix and Wndows are defining Args as:

struct Args {
     args: vec::IntoIter<OsString>
}

which has no reason to be !Send and !Sync, I am not sure about that cloudabi platform though given that I didn't find it in the source code.

If the Std allocates for these types on all the platforms(i.e., basically a Vec<OsString>), we can probably make them Send and Sync

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.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