]> git.lizzy.rs Git - rust.git/commit
Auto merge of #2630 - RalfJung:windows-parking, r=RalfJung
authorbors <bors@rust-lang.org>
Fri, 28 Oct 2022 20:19:28 +0000 (20:19 +0000)
committerbors <bors@rust-lang.org>
Fri, 28 Oct 2022 20:19:28 +0000 (20:19 +0000)
commita0fbf0d0775d37d61a62643f2f3bdf45f8763067
tree5634da3652944c9bd2eea6fd66a0d930e7b99577
parent4827d41466af1e9b5f3a38d55f8f99e66e3f6842
parent9b0cdf9a6ef71708fbb405d53a64e4e60b2691a2
Auto merge of #2630 - RalfJung:windows-parking, r=RalfJung

Implement thread parking for Windows

Cc https://github.com/rust-lang/miri/issues/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.