Skip to content
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

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

Open
SteveLauC opened this issue Dec 7, 2023 · 1 comment
Open

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

SteveLauC opened this issue Dec 7, 2023 · 1 comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@SteveLauC
Copy link
Contributor

#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

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 7, 2023
@Noratrieb Noratrieb added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. C-feature-request Category: A feature request, i.e: not implemented / a PR. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Dec 7, 2023
@dev-ardi
Copy link
Contributor

Why were they made !Send and !Sync in the first place? I haven't been able to find information about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants