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

Simpilfy thread::JoinInner. #92553

Merged
merged 1 commit into from
Jan 13, 2022
Merged

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Jan 4, 2022

JoinInner's native field was an Option, but that's unnecessary.

Also, thanks to Arc::get_mut, there's no unsafety needed in JoinInner::join().

@m-ou-se m-ou-se added A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 4, 2022
@rust-highfive
Copy link
Collaborator

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 Jan 4, 2022
@Mark-Simulacrum
Copy link
Member

Mark-Simulacrum commented Jan 4, 2022

FWIW it feels like naively the packet might be better represented as Arc<SyncOnceCell<Result<T>>>, but this PR seems good to me. (At the cost of an extra Once field).

@bors r+

@bors
Copy link
Contributor

bors commented Jan 4, 2022

📌 Commit a45b3ac has been approved by Mark-Simulacrum

@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 Jan 4, 2022
@m-ou-se
Copy link
Member Author

m-ou-se commented Jan 4, 2022

I'll be replacing Packet in the implementation for rust-lang/rfcs#3151. This was just a small clean-up to make that change slightly easier.

@matthiaskrgr
Copy link
Member

@bors rollup=never (might affect perf, just in case)

@bors
Copy link
Contributor

bors commented Jan 13, 2022

⌛ Testing commit a45b3ac with merge 256721e...

@bors
Copy link
Contributor

bors commented Jan 13, 2022

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 256721e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 13, 2022
@bors bors merged commit 256721e into rust-lang:master Jan 13, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 13, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (256721e): comparison url.

Summary: This benchmark run did not return any relevant changes.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

@m-ou-se m-ou-se deleted the thread-join-simplify branch January 13, 2022 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows C-cleanup Category: PRs that clean code up or issues documenting cleanup. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants