-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.lua
40 lines (34 loc) · 1.06 KB
/
test.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
xpcall(function()
print("cheers! start!")
local socket = require("socket.core")
for f in lfs.dir(".") do
print(f)
end
local handle, param = Common.CreateThread([[
local socket = require "socket.core"
for i = 1, 2, 1 do
print("child thread "..i)
socket.sleep(1)
end
return "ajflsejslgjoijfoisej"
]])
while not Common.WaitForSingleObject(handle) do
socket.sleep(0.5)
print("main thread")
-- local shell = io.popen(publist_cmd) or error("can't execute " .. publist_cmd)
-- result = shell:read("a")
-- shell:close()
end
-- if string.find(result, "Publish success!") then
-- Common.Write(string.format("Publish success! spent %ss", os.time() - start_time))
-- else
-- error(result)
-- end
print(Common.GetExitCodeThread(handle, param))
Common.CloseHandle(handle)
print("?????")
print(sqlite3)
print("cheers! end!")
end, function(msg)
print(msg)
end)