diff options
| author | bors <bors@rust-lang.org> | 2016-06-25 06:45:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-06-25 06:45:07 -0700 |
| commit | b8214dc6c6fc20d0a660fb5700dca9ebf51ebe89 (patch) | |
| tree | d5ece377c063ee50f99d8a4b4547cc38e3675489 /src/libstd | |
| parent | 35004b42bcd932222a4a58bf49d0d094ba397664 (diff) | |
| parent | 77b6a647bc0172fadf18413bbdf0ea5d0fba13b2 (diff) | |
| download | rust-b8214dc6c6fc20d0a660fb5700dca9ebf51ebe89.tar.gz rust-b8214dc6c6fc20d0a660fb5700dca9ebf51ebe89.zip | |
Auto merge of #34464 - Manishearth:rollup, r=Manishearth
Rollup of 8 pull requests - Successful merges: #34379, #34406, #34411, #34414, #34435, #34438, #34445, #34449 - Failed merges:
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/thread/mod.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index d83d45518e4..e68e525b4ac 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -610,6 +610,36 @@ impl<T> JoinInner<T> { /// Due to platform restrictions, it is not possible to `Clone` this /// handle: the ability to join a child thread is a uniquely-owned /// permission. +/// +/// This `struct` is created by the [`thread::spawn`] function and the +/// [`thread::Builder::spawn`] method. +/// +/// # Examples +/// +/// Creation from [`thread::spawn`]: +/// +/// ```rust +/// use std::thread; +/// +/// let join_handle: thread::JoinHandle<_> = thread::spawn(|| { +/// // some work here +/// }); +/// ``` +/// +/// Creation from [`thread::Builder::spawn`]: +/// +/// ```rust +/// use std::thread; +/// +/// let builder = thread::Builder::new(); +/// +/// let join_handle: thread::JoinHandle<_> = builder.spawn(|| { +/// // some work here +/// }).unwrap(); +/// ``` +/// +/// [`thread::spawn`]: fn.spawn.html +/// [`thread::Builder::spawn`]: struct.Builder.html#method.spawn #[stable(feature = "rust1", since = "1.0.0")] pub struct JoinHandle<T>(JoinInner<T>); |
