mirror of
https://github.com/rayaman/multi.git
synced 2026-09-05 07:27:35 -04:00
Issue#12 Changed
Modify the newThread method to allow for nameless coroutine based threads
This commit is contained in:
+6
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user