@@ -665,6 +665,19 @@ impl Builder {
665
665
/// println!("{result}");
666
666
/// ```
667
667
///
668
+ /// # Notes
669
+ ///
670
+ /// This function has the same minimal guarantee regarding "foreign" unwinding operations (e.g.
671
+ /// an exception thrown from C++ code, or a `panic!` in Rust code compiled or linked with a
672
+ /// different runtime) as [`catch_unwind`]; namely, if the thread created with `thread::spawn`
673
+ /// unwinds all the way to the root with such an exception, one of two behaviors are possible,
674
+ /// and it is unspecified which will occur:
675
+ ///
676
+ /// * The process aborts.
677
+ /// * The process does not abort, and [`join`] will return a `Result::Err`
678
+ /// containing an opaque type.
679
+ ///
680
+ /// [`catch_unwind`]: ../../std/panic/fn.catch_unwind.html
668
681
/// [`channels`]: crate::sync::mpsc
669
682
/// [`join`]: JoinHandle::join
670
683
/// [`Err`]: crate::result::Result::Err
@@ -1762,16 +1775,15 @@ impl<T> JoinHandle<T> {
1762
1775
///
1763
1776
/// # Notes
1764
1777
///
1765
- /// This function has the same minimal guarantee regarding "foreign" unwinding operations (e.g.
1766
- /// an exception thrown from C++ code, or a `panic!` in Rust code compiled or linked with a
1767
- /// different runtime) as [`catch_unwind`]; namely, if the thread created with `thread::spawn`
1768
- /// unwinds all the way to the root with such an exception, this function will have one of two
1769
- /// behaviors, and it is unspecified which will occur:
1770
- ///
1771
- /// * The process aborts.
1772
- /// * The function returns a `Result::Err` containing an opaque type.
1778
+ /// If a "foreign" unwinding operation (e.g. an exception thrown from C++
1779
+ /// code, or a `panic!` in Rust code compiled or linked with a different
1780
+ /// runtime) unwinds all the way to the thread root, the process may be
1781
+ /// aborted; see the Notes on [`thread::spawn`]. If the process is not
1782
+ /// aborted, this function will return a `Result::Err` containing an opaque
1783
+ /// type.
1773
1784
///
1774
1785
/// [`catch_unwind`]: ../../std/panic/fn.catch_unwind.html
1786
+ /// [`thread::spawn`]: spawn
1775
1787
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1776
1788
pub fn join ( self ) -> Result < T > {
1777
1789
self . 0 . join ( )
0 commit comments