working on scheduler, nothing fix yet
This commit is contained in:
parent
c3a9ddfdbd
commit
6c73220a52
@ -1313,6 +1313,7 @@ function multi:attachScheduler()
|
||||
table.insert(threads,c)
|
||||
table.insert(startme,c)
|
||||
startme_len = #startme
|
||||
print("startme:",startme_len)
|
||||
globalThreads[c] = self
|
||||
if initT==false then
|
||||
self.initThreads()
|
||||
@ -1509,7 +1510,7 @@ function multi:attachScheduler()
|
||||
_,ret,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,r16 = resume(startme[start].thread,unpack(startme[start].startArgs))
|
||||
co_status[status(startme[startme_len].thread)](startme[startme_len].thread,startme[startme_len],t_none) --cmds[r1](startme[start],r2,r3,r4,r5)
|
||||
startme[startme_len] = nil
|
||||
startme_len = startme_len - 1
|
||||
startme_len = #startme
|
||||
end
|
||||
if threads[i] then
|
||||
ref = threads[i]
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
package.path="multi/?.lua;multi/?/init.lua;multi/?.lua;multi/?/?/init.lua;"..package.path
|
||||
require("lldebugger").start()
|
||||
|
||||
if os.getenv("LOCAL_LUA_DEBUGGER_VSCODE") == "1" then
|
||||
package.path="multi/?.lua;multi/?/init.lua;multi/?.lua;multi/?/?/init.lua;"..package.path
|
||||
require("lldebugger").start()
|
||||
else
|
||||
package.path="./?.lua;../?/init.lua;../?.lua;../?/?/init.lua;"..package.path
|
||||
end
|
||||
--[[
|
||||
This file runs all tests.
|
||||
Format:
|
||||
@ -17,8 +20,6 @@ require("lldebugger").start()
|
||||
The expected and actual should "match" (Might be impossible when playing with threads)
|
||||
This will be pushed directly to the master as tests start existing.
|
||||
]]
|
||||
os.execute("cd multi")
|
||||
os.execute("pwd")
|
||||
local multi, thread = require("multi"):init{priority=true}
|
||||
local good = false
|
||||
runTest = thread:newFunction(function()
|
||||
@ -38,7 +39,6 @@ runTest = thread:newFunction(function()
|
||||
require("tests/connectionTest")(conn_thread,thread)
|
||||
conn_thread.Stop()
|
||||
--print(multi:getTasksDetails())
|
||||
os.exit()
|
||||
end)
|
||||
runTest().OnError(function(...)
|
||||
print("Error:",...)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user