Skip to content

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Sep 19, 2020

This moves the parking/unparking logic out of thread/mod.rs into a module named thread_parker in sys_common. The current implementation is moved to sys_common/thread_parker/generic.rs and the new implementation using futexes is added in sys_common/thread_parker/futex.rs.

@rust-highfive
Copy link
Contributor

r? @kennytm

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 19, 2020
@kennytm
Copy link
Member

kennytm commented Sep 19, 2020

r? @dtolnay

@rust-highfive rust-highfive assigned dtolnay and unassigned kennytm Sep 19, 2020
@m-ou-se m-ou-se changed the title Use futex-based thread::park/unpark on Linux. Use futex-based thread::park/unpark on Linux and Windows. Sep 19, 2020
@m-ou-se
Copy link
Member Author

m-ou-se commented Sep 19, 2020

Hm, looks like WaitOnAddress is only available on Windows 8+, but the Rust documentation promises tier 1 support for Windows 7+. Reverting the Windows part for now.

@m-ou-se m-ou-se changed the title Use futex-based thread::park/unpark on Linux and Windows. Use futex-based thread::park/unpark on Linux. Sep 19, 2020
@m-ou-se
Copy link
Member Author

m-ou-se commented Sep 24, 2020

@rustbot modify labels: +T-libs +A-concurrency +O-linux

@rustbot rustbot added A-concurrency Area: Concurrency O-linux Operating system: Linux T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Sep 24, 2020
Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is fantastic.

@dtolnay
Copy link
Member

dtolnay commented Oct 1, 2020

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 1, 2020

📌 Commit 0b73fd7 has been approved by dtolnay

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 1, 2020
@bors
Copy link
Collaborator

bors commented Oct 1, 2020

⌛ Testing commit 0b73fd7 with merge 7820135...

@bors
Copy link
Collaborator

bors commented Oct 1, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: dtolnay
Pushing 7820135 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 1, 2020
@bors bors merged commit 7820135 into rust-lang:master Oct 1, 2020
@rustbot rustbot added this to the 1.48.0 milestone Oct 1, 2020
@rust-highfive
Copy link
Contributor

📣 Toolstate changed by #76919!

Tested on commit 7820135.
Direct link to PR: #76919

💔 miri on linux: test-pass → test-fail (cc @oli-obk @eddyb @RalfJung).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Oct 1, 2020
Tested on commit rust-lang/rust@7820135.
Direct link to PR: <rust-lang/rust#76919>

💔 miri on linux: test-pass → test-fail (cc @oli-obk @eddyb @RalfJung).
@m-ou-se m-ou-se deleted the thread-parker branch December 6, 2020 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-concurrency Area: Concurrency merged-by-bors This PR was explicitly merged by bors. O-linux Operating system: Linux S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants