A unique identifier for a running thread.
More...
|
|
constexpr auto | as_u64 () const noexcept |
| | Unstable in Rust: thread_id_value
|
| |
|
|
static ThreadId | make () |
| | Generates a new unique thread ID using an atomic counter.
|
| |
| static constexpr auto | from_u64 (value_type v) noexcept -> Option< ThreadId > |
| | Attempts to construct a ThreadId from a raw u64 value.
|
| |
A unique identifier for a running thread.
ThreadId is an opaque object that uniquely identifies each thread created during the lifetime of a process. IDs are guaranteed not to be reused. (No promise about relation to OS thread IDs.)
◆ from_u64()
| static constexpr auto rstd::thread::ThreadId::from_u64 |
( |
value_type | v | ) |
-> Option<ThreadId> |
|
inlinestaticconstexprnoexcept |
Attempts to construct a ThreadId from a raw u64 value.
- Parameters
-
| v | The raw identifier value; must be non-zero. |
- Returns
- Some(ThreadId) if v is non-zero, None otherwise.
The documentation for this class was generated from the following file:
- /home/runner/work/rstd/rstd/src/std/thread/id.cppm