diff options
| author | bors <bors@rust-lang.org> | 2017-08-27 04:20:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-08-27 04:20:28 +0000 |
| commit | 93cdf5e3c45a0578c79afe8563065d07e5f6984f (patch) | |
| tree | 89335a69e7db0057a54ade2e1365349fa26a9c0d /src/libstd/thread | |
| parent | 3e964612302e649e3c59a0b556001d801357306d (diff) | |
| parent | dc7c7ba0c9f401f5597a245e05ee9e8d760715d3 (diff) | |
| download | rust-93cdf5e3c45a0578c79afe8563065d07e5f6984f.tar.gz rust-93cdf5e3c45a0578c79afe8563065d07e5f6984f.zip | |
Auto merge of #44112 - alexcrichton:thread-join, r=sfackler
std: Handle OS errors when joining threads Also add to the documentation that the `join` method can panic. cc #34971 cc #43539
Diffstat (limited to 'src/libstd/thread')
| -rw-r--r-- | src/libstd/thread/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index 6354e746af2..4912ff93abd 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -1230,6 +1230,11 @@ impl<T> JoinHandle<T> { /// [`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 /// /// ``` |
