-
Notifications
You must be signed in to change notification settings - Fork 346
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
Support synchronization primitives on Windows #2628
Labels
A-shims
Area: This affects the external function shims
A-windows
Area: affects only Windows targets
E-good-first-issue
A good way to start contributing, mentoring is available
Comments
@drmeepster if I recall, you actually had a first implementation of at least thread parking. Is that code still available somewhere? |
RalfJung
added
A-shims
Area: This affects the external function shims
A-windows
Area: affects only Windows targets
E-medium
labels
Oct 28, 2022
bors
added a commit
that referenced
this issue
Oct 28, 2022
Implement thread parking for Windows Cc #2628 Based on code by `@DrMeepster.` However I adjusted `WakeByAddressSingle`: I don't think the futex value is compared *again* after the thread is woken up. I see nothing in the Windows docs indicating such a comparison, and the Linux futex does not behave like that either. So we only check the value before sleeping, same as on Linux.
RalfJung
pushed a commit
to RalfJung/rust
that referenced
this issue
Oct 29, 2022
Implement thread parking for Windows Cc rust-lang/miri#2628 Based on code by `@DrMeepster.` However I adjusted `WakeByAddressSingle`: I don't think the futex value is compared *again* after the thread is woken up. I see nothing in the Windows docs indicating such a comparison, and the Linux futex does not behave like that either. So we only check the value before sleeping, same as on Linux.
Thread parking is implemented now, Condvars are still missing. |
RalfJung
added
E-good-first-issue
A good way to start contributing, mentoring is available
and removed
E-medium
labels
Oct 29, 2022
Opened #2638 for condvars |
RalfJung
pushed a commit
to RalfJung/miri
that referenced
this issue
Nov 15, 2022
Implement condvars for Windows Adds 3 shims for Windows: `SleepConditionVariableSRW`, `WakeConditionVariable`, `WakeAllConditionVariable` to add support for condvars (which fixes rust-lang#2628). Salvaged from what was removed from rust-lang#2231
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-shims
Area: This affects the external function shims
A-windows
Area: affects only Windows targets
E-good-first-issue
A good way to start contributing, mentoring is available
Thanks to @drmeepster we now do support basic concurrency and atomics on Windows (#2231). However, we do not support all of the standard library concurrency primitives. Based on my testing:
The fact that we don't support thread parking (which is needed by
std::sync::mpsc
) unfortunately blocks rust-lang/rust#103681.The text was updated successfully, but these errors were encountered: