Task库细节修正
This commit is contained in:
@@ -23,7 +23,7 @@ function TASK.update()
|
|||||||
end
|
end
|
||||||
function TASK.new(code,...)
|
function TASK.new(code,...)
|
||||||
local thread=ct.create(code)
|
local thread=ct.create(code)
|
||||||
if ...~=nil then ct.resume(thread,...)end
|
ct.resume(thread,...)
|
||||||
if ct.status(thread)~="dead"then
|
if ct.status(thread)~="dead"then
|
||||||
tasks[#tasks+1]={
|
tasks[#tasks+1]={
|
||||||
thread=thread,
|
thread=thread,
|
||||||
@@ -34,7 +34,7 @@ function TASK.new(code,...)
|
|||||||
end
|
end
|
||||||
function TASK.newNet(code,...)
|
function TASK.newNet(code,...)
|
||||||
local thread=ct.create(code)
|
local thread=ct.create(code)
|
||||||
if ...~=nil then ct.resume(thread,...)end
|
ct.resume(thread,...)
|
||||||
if ct.status(thread)~="dead"then
|
if ct.status(thread)~="dead"then
|
||||||
tasks[#tasks+1]={
|
tasks[#tasks+1]={
|
||||||
thread=thread,
|
thread=thread,
|
||||||
|
|||||||
Reference in New Issue
Block a user