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

Implement RFC 909: move thread_local into thread #23557

Merged
merged 1 commit into from
Mar 24, 2015
Merged

Conversation

aturon
Copy link
Member

@aturon aturon commented Mar 20, 2015

This commit implements RFC 909:

The std::thread_local module is now deprecated, and its contents are
available directly in std::thread as LocalKey, LocalKeyState, and
ScopedKey.

The macros remain exactly as they were, which means little if any code
should break. Nevertheless, this is technically a:

[breaking-change]

Closes #23547

@aturon
Copy link
Member Author

aturon commented Mar 20, 2015

cc @carllerche

@rust-highfive
Copy link
Collaborator

r? @brson

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

@aturon aturon mentioned this pull request Mar 20, 2015
91 tasks
#[unstable(feature = "std_misc")]
#[deprecated(since = "1.0.0", reason = "use std::thread::ScopedKey instead")]
/// Deprecated: use `std::threaed::ScopedKey` instead.
pub use thread::ScopedKey as Key;
Copy link
Member

Choose a reason for hiding this comment

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

Due to pub use not actually issuing deprecation warnings, and the fact that this is such a relatively rarely imported module, I'd be fine just deleting this module.

@aturon
Copy link
Member Author

aturon commented Mar 20, 2015

Comments addressed. Thanks!

@alexcrichton
Copy link
Member

@bors: r+ 218b5abf5f703555d50833af6bd3fd966c8901f6

@aturon
Copy link
Member Author

aturon commented Mar 20, 2015

@bors: r=alexcrichton 6143776

@bors
Copy link
Contributor

bors commented Mar 21, 2015

☔ The latest upstream changes (presumably #23512) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Contributor

bors commented Mar 21, 2015

🔒 Merge conflict

@@ -156,6 +190,22 @@ use time::Duration;
use sys::thread as imp;
use sys_common::{stack, thread_info};

////////////////////////////////////////////////////////////////////////////////
// Thread-local storage
Copy link
Member

Choose a reason for hiding this comment

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

I don’t like these comments as they usually suggest the file is getting too big and should be split into more, instead of adding such comments.

This commit implements [RFC
909](rust-lang/rfcs#909):

The `std::thread_local` module is now deprecated, and its contents are
available directly in `std::thread` as `LocalKey`, `LocalKeyState`, and
`ScopedKey`.

The macros remain exactly as they were, which means little if any code
should break. Nevertheless, this is technically a:

[breaking-change]

Closes rust-lang#23547
@aturon
Copy link
Member Author

aturon commented Mar 23, 2015

@bors: r=alexcrichton 6bd3ab0

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Mar 23, 2015
This commit implements [RFC 909](rust-lang/rfcs#909):

The `std::thread_local` module is now deprecated, and its contents are
available directly in `std::thread` as `LocalKey`, `LocalKeyState`, and
`ScopedKey`.

The macros remain exactly as they were, which means little if any code
should break. Nevertheless, this is technically a:

[breaking-change]

Closes rust-lang#23547
@bors bors merged commit 6bd3ab0 into rust-lang:master Mar 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking issue for Move std::thread_local::* into std::thread (RFC 909)
6 participants