diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2017-08-26 19:36:46 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2017-08-26 19:36:46 -0700 |
| commit | dc7c7ba0c9f401f5597a245e05ee9e8d760715d3 (patch) | |
| tree | 3368e960243d97ec04df19b3b7e51653913baaac /src/libstd/thread | |
| parent | 398aaffc94367ed59420f5ac0b0238c04c9e4fa5 (diff) | |
| download | rust-dc7c7ba0c9f401f5597a245e05ee9e8d760715d3.tar.gz rust-dc7c7ba0c9f401f5597a245e05ee9e8d760715d3.zip | |
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 ee103c803f5..195a02ae537 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 /// /// ``` |
