Skip to content

Commit 0dfe6da

Browse files
sfacklerbrson
authored andcommitted
Stabilize ThreadId
Closes #21507
1 parent 6a10e35 commit 0dfe6da

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/libstd/thread/mod.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -821,8 +821,6 @@ pub fn park_timeout(dur: Duration) {
821821
/// # Examples
822822
///
823823
/// ```
824-
/// #![feature(thread_id)]
825-
///
826824
/// use std::thread;
827825
///
828826
/// let other_thread = thread::spawn(|| {
@@ -832,7 +830,7 @@ pub fn park_timeout(dur: Duration) {
832830
/// let other_thread_id = other_thread.join().unwrap();
833831
/// assert!(thread::current().id() != other_thread_id);
834832
/// ```
835-
#[unstable(feature = "thread_id", issue = "21507")]
833+
#[stable(feature = "thread_id", since = "1.19.0")]
836834
#[derive(Eq, PartialEq, Clone, Copy, Hash, Debug)]
837835
pub struct ThreadId(u64);
838836

@@ -962,8 +960,6 @@ impl Thread {
962960
/// # Examples
963961
///
964962
/// ```
965-
/// #![feature(thread_id)]
966-
///
967963
/// use std::thread;
968964
///
969965
/// let other_thread = thread::spawn(|| {
@@ -973,7 +969,7 @@ impl Thread {
973969
/// let other_thread_id = other_thread.join().unwrap();
974970
/// assert!(thread::current().id() != other_thread_id);
975971
/// ```
976-
#[unstable(feature = "thread_id", issue = "21507")]
972+
#[stable(feature = "thread_id", since = "1.19.0")]
977973
pub fn id(&self) -> ThreadId {
978974
self.inner.id
979975
}
@@ -1164,8 +1160,6 @@ impl<T> JoinHandle<T> {
11641160
/// # Examples
11651161
///
11661162
/// ```
1167-
/// #![feature(thread_id)]
1168-
///
11691163
/// use std::thread;
11701164
///
11711165
/// let builder = thread::Builder::new();

0 commit comments

Comments
 (0)