开发手册线程模块 (thread)线程模块 (thread) thread 模块使用 Lua 自带协程 (coroutine) 模块实现,非通常意义上的多线程。 派发一个任务 (thread.dispatch) 获取当前任务的 ID (thread.current_id) 从队列中移除一项任务 (thread.kill) 阻塞等待另一个任务完成 (thread.wait) 注册监听一个事件 (thread.register_event) 反注册监听一个事件 (thread.unregister_event) thread 示例代码