From dc7c7ba0c9f401f5597a245e05ee9e8d760715d3 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sat, 26 Aug 2017 19:36:46 -0700 Subject: std: Handle OS errors when joining threads Also add to the documentation that the `join` method can panic. cc #34971 cc #43539 --- src/libstd/thread/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libstd/thread') diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index ee103c803f5..195a02ae537 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -1230,6 +1230,11 @@ impl JoinHandle { /// [`Err`]: ../../std/result/enum.Result.html#variant.Err /// [`panic`]: ../../std/macro.panic.html /// + /// # Panics + /// + /// This function may panic on some platforms if a thread attempts to join + /// itself or otherwise may create a deadlock with joining threads. + /// /// # Examples /// /// ``` -- cgit 1.4.1-3-g733a5