TASK模块创建任务第一次执行的时候也用assert保证错误被捕捉
This commit is contained in:
@@ -23,7 +23,7 @@ function TASK.update(dt)
|
|||||||
end
|
end
|
||||||
function TASK.new(code,...)
|
function TASK.new(code,...)
|
||||||
local thread=coroutine.create(code)
|
local thread=coroutine.create(code)
|
||||||
resume(thread,...)
|
assert(resume(thread,...))
|
||||||
if status(thread)~='dead'then
|
if status(thread)~='dead'then
|
||||||
tasks[#tasks+1]={
|
tasks[#tasks+1]={
|
||||||
thread=thread,
|
thread=thread,
|
||||||
|
|||||||
Reference in New Issue
Block a user