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

Mark libc's `fs::Dir as Sync #1232

Merged
merged 1 commit into from
Dec 8, 2024
Merged

Conversation

nrath-js
Copy link
Contributor

@nrath-js nrath-js commented Dec 3, 2024

This is safe since all methods that mutate the internal state require a &mut self. It also makes behavior consistent with the linux_raw backend (whose fs::Dir is Sync+Send).

Fixes: #1230.

This is safe since all methods that mutate the internal state require
a &mut self. It also makes behavior consistent with the linux_raw
backend (whose `fs::Dir` is Sync+Send).

Fixes: bytecodealliance#1230.
@nrath-js
Copy link
Contributor Author

nrath-js commented Dec 3, 2024

I think the (Windows) test failures are unrelated to this change. Is that correct?

@sunfishcode
Copy link
Member

Thanks!

@sunfishcode sunfishcode merged commit 5a012c8 into bytecodealliance:main Dec 8, 2024
22 of 45 checks passed
sunfishcode pushed a commit that referenced this pull request Dec 8, 2024
This is safe since all methods that mutate the internal state require
a &mut self. It also makes behavior consistent with the linux_raw
backend (whose `fs::Dir` is Sync+Send).

Fixes: #1230.
sunfishcode pushed a commit that referenced this pull request Dec 8, 2024
This is safe since all methods that mutate the internal state require
a &mut self. It also makes behavior consistent with the linux_raw
backend (whose `fs::Dir` is Sync+Send).

Fixes: #1230.
@sunfishcode
Copy link
Member

This is now released in rustix 0.38.42.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Why is fs::Dir not Sync?
2 participants