Skip to content

Commit

Permalink
Indicate thread names get passed to the OS.
Browse files Browse the repository at this point in the history
  • Loading branch information
frewsxcv committed Aug 13, 2017
1 parent 150713c commit 10bd80d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/libstd/thread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,14 @@
//!
//! ## Naming threads
//!
//! Threads are able to have associated names for identification purposes. For example, the thread
//! name is used in panic messages. By default, spawned threads are unnamed. To specify a name for
//! a thread, build the thread with [`Builder`] and pass the desired thread name to
//! [`Builder::name`]. To retrieve the thread name from within the thread, use [`Thread::name`].
//! Threads are able to have associated names for identification purposes. By default, spawned
//! threads are unnamed. To specify a name for a thread, build the thread with [`Builder`] and pass
//! the desired thread name to [`Builder::name`]. To retrieve the thread name from within the
//! thread, use [`Thread::name`]. A couple examples of where the name of a thread gets used:
//!
//! * If a panic occurs in a named thread, the thread name will be printed in the panic message.
//! * The thread name is provided to the OS where applicable (e.g. `pthread_setname_np` in
//! unix-like platforms).
//!
//! ## Stack size
//!
Expand Down

0 comments on commit 10bd80d

Please sign in to comment.