Content-Length: 335127 | pFad | https://github.com/rust-lang/rust/pull/45524

34 std: Optimize thread park/unpark implementation by alexcrichton · Pull Request #45524 · rust-lang/rust · GitHub
Skip to content

Comments

std: Optimize thread park/unpark implementation#45524

Merged
bors merged 1 commit intorust-lang:masterfrom
alexcrichton:improve-park-unpark
Oct 27, 2017
Merged

std: Optimize thread park/unpark implementation#45524
bors merged 1 commit intorust-lang:masterfrom
alexcrichton:improve-park-unpark

Conversation

@alexcrichton
Copy link
Member

This is an adaptation of rust-lang/futures-rs#597 for the standard library.
The goal here is to avoid locking a mutex on the "fast path" for thread
park/unpark where you're waking up a thread that isn't sleeping or otherwise
trying to park a thread that's already been notified. Mutex performance varies
quite a bit across platforms so this should provide a nice consistent speed
boost for the fast path of these functions.

This is an adaptation of rust-lang/futures-rs#597 for the standard library.
The goal here is to avoid locking a mutex on the "fast path" for thread
park/unpark where you're waking up a thread that isn't sleeping or otherwise
trying to park a thread that's already been notified. Mutex performance varies
quite a bit across platforms so this should provide a nice consistent speed
boost for the fast path of these functions.
@rust-highfive
Copy link
Contributor

r? @dtolnay

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

@dtolnay
Copy link
Member

dtolnay commented Oct 25, 2017

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 25, 2017

📌 Commit 6511e46 has been approved by dtolnay

@kennytm kennytm added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 25, 2017
@bors
Copy link
Collaborator

bors commented Oct 27, 2017

⌛ Testing commit 6511e46 with merge 1855aff...

bors added a commit that referenced this pull request Oct 27, 2017
std: Optimize thread park/unpark implementation

This is an adaptation of rust-lang/futures-rs#597 for the standard library.
The goal here is to avoid locking a mutex on the "fast path" for thread
park/unpark where you're waking up a thread that isn't sleeping or otherwise
trying to park a thread that's already been notified. Mutex performance varies
quite a bit across platforms so this should provide a nice consistent speed
boost for the fast path of these functions.
@bors
Copy link
Collaborator

bors commented Oct 27, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: dtolnay
Pushing 1855aff to master...

@bors bors merged commit 6511e46 into rust-lang:master Oct 27, 2017
@alexcrichton alexcrichton deleted the improve-park-unpark branch October 28, 2017 12:56
@bluss bluss added the relnotes Marks issues that should be documented in the release notes of the next release. label Nov 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/rust-lang/rust/pull/45524

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy