about summary refs log tree commit diff
path: root/src/libstd/thread
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-11-07 18:04:33 +0000
committerbors <bors@rust-lang.org>2017-11-07 18:04:33 +0000
commit7f6417e9b72de63666fd92caf1a6b96a778b60ed (patch)
treecbdb0b5298e76188aea3582191e2ad82dfc811b9 /src/libstd/thread
parent7ade24f67201531778e7674b4b63ebf1a23c9643 (diff)
parent0d53ecd0c788d5c492cf5023c8c76420ef349244 (diff)
downloadrust-7f6417e9b72de63666fd92caf1a6b96a778b60ed.tar.gz
rust-7f6417e9b72de63666fd92caf1a6b96a778b60ed.zip
Auto merge of #45822 - kennytm:rollup, r=kennytm
Rollup of 9 pull requests

- Successful merges: #45470, #45588, #45682, #45714, #45751, #45764, #45778, #45782, #45784
- Failed merges:
Diffstat (limited to 'src/libstd/thread')
-rw-r--r--src/libstd/thread/mod.rs14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 28a33c7ec14..ee49bf796b8 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -25,11 +25,15 @@
 //!
 //! Fatal logic errors in Rust cause *thread panic*, during which
 //! a thread will unwind the stack, running destructors and freeing
-//! owned resources. Thread panic is unrecoverable from within
-//! the panicking thread (i.e. there is no 'try/catch' in Rust), but
-//! the panic may optionally be detected from a different thread. If
-//! the main thread panics, the application will exit with a non-zero
-//! exit code.
+//! owned resources. While not meant as a 'try/catch' mechanism, panics
+//! in Rust can nonetheless be caught (unless compiling with `panic=abort`) with
+//! [`catch_unwind`](../../std/panic/fn.catch_unwind.html) and recovered
+//! from, or alternatively be resumed with
+//! [`resume_unwind`](../../std/panic/fn.resume_unwind.html). If the panic
+//! is not caught the thread will exit, but the panic may optionally be
+//! detected from a different thread with [`join`]. If the main thread panics
+//! without the panic being caught, the application will exit with a
+//! non-zero exit code.
 //!
 //! When the main thread of a Rust program terminates, the entire program shuts
 //! down, even if other threads are still running. However, this module provides