@@ -820,7 +820,8 @@ pub fn park_timeout(dur: Duration) {
820
820
///
821
821
/// A `ThreadId` is an opaque object that has a unique value for each thread
822
822
/// that creates one. `ThreadId`s are not guaranteed to correspond to a thread's
823
- /// system-designated identifier.
823
+ /// system-designated identifier. A `ThreadId` can be retrieved from the [`id`]
824
+ /// method on a [`Thread`].
824
825
///
825
826
/// # Examples
826
827
///
@@ -834,6 +835,9 @@ pub fn park_timeout(dur: Duration) {
834
835
/// let other_thread_id = other_thread.join().unwrap();
835
836
/// assert!(thread::current().id() != other_thread_id);
836
837
/// ```
838
+ ///
839
+ /// [`id`]: ../../std/thread/struct.Thread.html#method.id
840
+ /// [`Thread`]: ../../std/thread/struct.Thread.html
837
841
#[ stable( feature = "thread_id" , since = "1.19.0" ) ]
838
842
#[ derive( Eq , PartialEq , Clone , Copy , Hash , Debug ) ]
839
843
pub struct ThreadId ( u64 ) ;
@@ -896,6 +900,9 @@ struct Inner {
896
900
/// docs of [`Builder`] and [`spawn`] for more details.
897
901
///
898
902
/// [`Builder`]: ../../std/thread/struct.Builder.html
903
+ /// [`JoinHandle::thread`]: ../../std/thread/struct.JoinHandle.html#method.thread
904
+ /// [`JoinHandle`]: ../../std/thread/struct.JoinHandle.html
905
+ /// [`thread::current`]: ../../std/thread/fn.current.html
899
906
/// [`spawn`]: ../../std/thread/fn.spawn.html
900
907
901
908
pub struct Thread {
0 commit comments