NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
thread::id结构体 参考

线程唯一标识符类 更多...

#include <thread.hpp>

类 thread::id 继承关系图:
[图例]

Public 成员函数

 id () noexcept=default
 默认构造函数
 id (const native_id_type id) noexcept
 从原生ID构造
NEFORCE_NODISCARD native_id_type native_handle () const noexcept
 获取原生线程ID
NEFORCE_NODISCARD size_t to_hash () const noexcept
 计算哈希值
NEFORCE_NODISCARD bool operator== (const id &rhs) const noexcept
 等于比较运算符
NEFORCE_NODISCARD bool operator!= (const id &rhs) const noexcept
 不等于比较运算符
Public 成员函数 继承自 ihashable< id >
NEFORCE_NODISCARD constexpr size_t to_hash () const noexcept(noexcept(derived().to_hash()))
 获取对象的哈希值

详细描述

线程唯一标识符类

用于标识线程,支持哈希和比较操作。

在文件 thread.hpp73 行定义.

构造及析构函数说明

◆ id()

thread::id::id ( const native_id_type id)
inlineexplicitnoexcept

从原生ID构造

参数
id原生线程ID

在文件 thread.hpp99 行定义.

成员函数说明

◆ native_handle()

NEFORCE_NODISCARD native_id_type thread::id::native_handle ( ) const
inlinenoexcept

获取原生线程ID

返回
原生线程ID

在文件 thread.hpp106 行定义.

◆ operator!=()

NEFORCE_NODISCARD bool thread::id::operator!= ( const id & rhs) const
inlinenoexcept

不等于比较运算符

参数
rhs右操作数
返回
两个线程ID是否不相等

在文件 thread.hpp134 行定义.

◆ operator==()

NEFORCE_NODISCARD bool thread::id::operator== ( const id & rhs) const
inlinenoexcept

等于比较运算符

参数
rhs右操作数
返回
两个线程ID是否相等

在文件 thread.hpp121 行定义.

◆ to_hash()

NEFORCE_NODISCARD size_t thread::id::to_hash ( ) const
inlinenoexcept

计算哈希值

返回
哈希值

在文件 thread.hpp112 行定义.

引用了 FNV_hash().


该结构体的文档由以下文件生成: