diff options
| author | bors <bors@rust-lang.org> | 2015-02-24 09:33:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-02-24 09:33:17 +0000 |
| commit | dccdde4007c191aa8b8d9cfffb0c7d3509fa675e (patch) | |
| tree | f4493e88a229c9622daf5389616001fd48d337c2 /src/libstd/thread.rs | |
| parent | 0ef56da541a90c62801440702a3e3c009e5332be (diff) | |
| parent | b182cd7245a999ac702f88c89dcc28811d6fdf8a (diff) | |
| download | rust-dccdde4007c191aa8b8d9cfffb0c7d3509fa675e.tar.gz rust-dccdde4007c191aa8b8d9cfffb0c7d3509fa675e.zip | |
Auto merge of #22755 - Manishearth:rollup, r=Manishearth
Diffstat (limited to 'src/libstd/thread.rs')
| -rw-r--r-- | src/libstd/thread.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/libstd/thread.rs b/src/libstd/thread.rs index 1f70e1526a0..6aad2bbcc7f 100644 --- a/src/libstd/thread.rs +++ b/src/libstd/thread.rs @@ -342,12 +342,15 @@ impl Builder { } } -/// Spawn a new, returning a join handle for it. +/// Spawn a new thread, returning a `JoinHandle` for it. /// -/// The child thread may outlive the parent (unless the parent thread -/// is the main thread; the whole process is terminated when the main -/// thread finishes.) The join handle can be used to block on -/// termination of the child thread, including recovering its panics. +/// The join handle will implicitly *detach* the child thread upon being +/// dropped. In this case, the child thread may outlive the parent (unless +/// the parent thread is the main thread; the whole process is terminated when +/// the main thread finishes.) Additionally, the join handle provides a `join` +/// method that can be used to join the child thread. If the child thread +/// panics, `join` will return an `Err` containing the argument given to +/// `panic`. /// /// # Panics /// |
