Skip to content

Commit

Permalink
Stabilize ThreadId
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler authored and brson committed Jul 8, 2017
1 parent 6a10e35 commit 0dfe6da
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/libstd/thread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -821,8 +821,6 @@ pub fn park_timeout(dur: Duration) {
/// # Examples
///
/// ```
/// #![feature(thread_id)]
///
/// use std::thread;
///
/// let other_thread = thread::spawn(|| {
Expand All @@ -832,7 +830,7 @@ pub fn park_timeout(dur: Duration) {
/// let other_thread_id = other_thread.join().unwrap();
/// assert!(thread::current().id() != other_thread_id);
/// ```
#[unstable(feature = "thread_id", issue = "21507")]
#[stable(feature = "thread_id", since = "1.19.0")]
#[derive(Eq, PartialEq, Clone, Copy, Hash, Debug)]
pub struct ThreadId(u64);

Expand Down Expand Up @@ -962,8 +960,6 @@ impl Thread {
/// # Examples
///
/// ```
/// #![feature(thread_id)]
///
/// use std::thread;
///
/// let other_thread = thread::spawn(|| {
Expand All @@ -973,7 +969,7 @@ impl Thread {
/// let other_thread_id = other_thread.join().unwrap();
/// assert!(thread::current().id() != other_thread_id);
/// ```
#[unstable(feature = "thread_id", issue = "21507")]
#[stable(feature = "thread_id", since = "1.19.0")]
pub fn id(&self) -> ThreadId {
self.inner.id
}
Expand Down Expand Up @@ -1164,8 +1160,6 @@ impl<T> JoinHandle<T> {
/// # Examples
///
/// ```
/// #![feature(thread_id)]
///
/// use std::thread;
///
/// let builder = thread::Builder::new();
Expand Down

0 comments on commit 0dfe6da

Please sign in to comment.