diff options
| author | Adolfo OchagavĂa <aochagavia92@gmail.com> | 2015-02-20 23:45:40 +0100 |
|---|---|---|
| committer | Adolfo OchagavĂa <aochagavia92@gmail.com> | 2015-02-21 12:07:05 +0100 |
| commit | 189409f85b8479ccbaf15c7da2cdc1fcb1a20794 (patch) | |
| tree | 6a5917e91809e2a379fad58059b5913d6fbbc872 /src/libstd | |
| parent | 522d09dfecbeca1595f25ac58c6d0178bbd21d7d (diff) | |
| download | rust-189409f85b8479ccbaf15c7da2cdc1fcb1a20794.tar.gz rust-189409f85b8479ccbaf15c7da2cdc1fcb1a20794.zip | |
Fix thread documentation
Diffstat (limited to 'src/libstd')
| -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 3653e7e31d5..3f56de1c6e1 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 /// |
