std: Handle OS errors when joining threads
Also add to the documentation that the `join` method can panic. cc #34971 cc #43539
This commit is contained in:
parent
398aaffc94
commit
dc7c7ba0c9
4 changed files with 13 additions and 2 deletions
|
@ -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
|
||||
///
|
||||
/// ```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue