mirror of
https://github.com/rayaman/multi.git
synced 2026-09-04 23:17:35 -04:00
bug fixing should be done
This commit is contained in:
-22
@@ -1,22 +0,0 @@
|
||||
package.path = "?/init.lua;?.lua;"..package.path
|
||||
|
||||
local multi, thread = require("multi"):init()
|
||||
net = require("lnet.tcp")
|
||||
|
||||
client = net.newTCPClient("localhost",12345)
|
||||
multi:newThread(function()
|
||||
while true do
|
||||
thread.sleep(1)
|
||||
client:send(multi:getTasksDetails())
|
||||
end
|
||||
end)
|
||||
|
||||
multi:newThread(function()
|
||||
while true do
|
||||
thread.sleep(.01)
|
||||
multi:newLoop()
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
multi:mainloop()
|
||||
@@ -984,7 +984,6 @@ end
|
||||
local sandcount = 1
|
||||
function multi:newProcessor(name)
|
||||
local c = {}
|
||||
print("Proc Created:",sandcount)
|
||||
setmetatable(c,{__index = self})
|
||||
local multi,thread = require("multi"):init() -- We need to capture the t in thread
|
||||
local name = name or "Processor_"..sandcount
|
||||
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
package.path = "?/init.lua;?.lua;"..package.path
|
||||
|
||||
local multi, thread = require("multi"):init()
|
||||
net = require("lnet.tcp")
|
||||
|
||||
server = net.newTCPServer(12345)
|
||||
server.OnDataRecieved(function(self,data)
|
||||
print(data)
|
||||
end)
|
||||
|
||||
multi:mainloop()
|
||||
Reference in New Issue
Block a user