语法
getactorfromthread(thread: thread): Instance | nil别名
getactorfromstate参数
| 名称 | 类型 | 描述 |
|---|---|---|
thread | thread | 线程要检查或运行在里面。 |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
actor | Instance | nil | Actor 实例,或者当没有关联时为零。 |
说明
返回与线程关联的 Actor。
使用 1 个参数调用: thread。参数表会说明哪些值必填,哪些值只用于细化行为。
返回 actor (Instance | nil)。使用返回表区分成功值、nil 结果和可恢复错误。
示例
使用占位值的示例调用。
local result = getactorfromthread(coroutine.running())
print(result)