diff options
| author | bors <bors@rust-lang.org> | 2017-08-03 19:40:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-08-03 19:40:27 +0000 |
| commit | 1d2a6df38442a297b4ae25899700e29d1f150bb0 (patch) | |
| tree | c1645692884760fd2459ca6ddd3e7c63b82550fa | |
| parent | c701ba6efb7ea2ca023cca39371294facfb00739 (diff) | |
| parent | 4c08c131fa6ef63809f6a4eb25ae1289dd381259 (diff) | |
| download | rust-1d2a6df38442a297b4ae25899700e29d1f150bb0.tar.gz rust-1d2a6df38442a297b4ae25899700e29d1f150bb0.zip | |
Auto merge of #43619 - frewsxcv:frewsxcv-thread, r=QuietMisdreavus
Thread docs fix and improvements. None
| -rw-r--r-- | src/libstd/thread/mod.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index 2ae62f8c3e0..cbd019c2c0e 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -820,7 +820,8 @@ pub fn park_timeout(dur: Duration) { /// /// A `ThreadId` is an opaque object that has a unique value for each thread /// that creates one. `ThreadId`s are not guaranteed to correspond to a thread's -/// system-designated identifier. +/// system-designated identifier. A `ThreadId` can be retrieved from the [`id`] +/// method on a [`Thread`]. /// /// # Examples /// @@ -834,6 +835,9 @@ pub fn park_timeout(dur: Duration) { /// let other_thread_id = other_thread.join().unwrap(); /// assert!(thread::current().id() != other_thread_id); /// ``` +/// +/// [`id`]: ../../std/thread/struct.Thread.html#method.id +/// [`Thread`]: ../../std/thread/struct.Thread.html #[stable(feature = "thread_id", since = "1.19.0")] #[derive(Eq, PartialEq, Clone, Copy, Hash, Debug)] pub struct ThreadId(u64); @@ -896,6 +900,9 @@ struct Inner { /// docs of [`Builder`] and [`spawn`] for more details. /// /// [`Builder`]: ../../std/thread/struct.Builder.html +/// [`JoinHandle::thread`]: ../../std/thread/struct.JoinHandle.html#method.thread +/// [`JoinHandle`]: ../../std/thread/struct.JoinHandle.html +/// [`thread::current`]: ../../std/thread/fn.current.html /// [`spawn`]: ../../std/thread/fn.spawn.html pub struct Thread { |
