语法
getthreadidentity(thread?: thread): integer别名
get_thread_identitygetidentitygetthreadcapsgetthreadcontextget_thread_context参数
| 名称 | 类型 | 描述 |
|---|---|---|
thread? | thread | 线程要检查或运行在里面。 |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
identity | integer | 线程标识级别。 |
说明
返回线程或当前线程的标识级别。
使用 1 个参数调用: thread。参数表会说明哪些值必填,哪些值只用于细化行为。
返回 identity (integer)。使用返回表区分成功值、nil 结果和可恢复错误。
示例
使用占位值的示例调用。
local result = getthreadidentity(coroutine.running())
print(result)