语法
run_on_thread(thread: thread, source: string, ...arguments?: ...any)别名
runonthread参数
| 名称 | 类型 | 描述 |
|---|---|---|
thread | thread | 线程要检查或运行在里面。 |
source | string | 操作使用的源值。 |
...arguments? | ...any | 转发到目标信号、参与者、线程或函数的参数。 |
说明
在特定线程上下文上运行源代码。
使用 3 个参数调用: thread, source, ...arguments。参数表会说明哪些值必填,哪些值只用于细化行为。
不返回数据。将调用视为一个动作,并在调用点附近处理错误。
示例
使用占位值的示例调用。
run_on_thread(coroutine.running(), "example", nil)