Issue#12 Changed

Modify the newThread method to allow for nameless coroutine based threads
This commit is contained in:
2019-03-23 20:54:29 -04:00
parent 31f1e10cfc
commit 8afef44252
2 changed files with 15 additions and 35 deletions
+6 -1
View File
@@ -1495,8 +1495,13 @@ end
multi:setDomainName("Threads")
multi:setDomainName("Globals")
local initT = false
local threadCount = 0
function multi:newThread(name,func)
if not func then return end
local func = func
if type(name) == "function" then
func = name
name = "Thread#"..threadCount
end
local c={}
c.ref={}
c.Name=name