aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/testLua/luaprocTest1.lua
diff options
context:
space:
mode:
Diffstat (limited to 'LuaSL/testLua/luaprocTest1.lua')
-rw-r--r--LuaSL/testLua/luaprocTest1.lua41
1 files changed, 0 insertions, 41 deletions
diff --git a/LuaSL/testLua/luaprocTest1.lua b/LuaSL/testLua/luaprocTest1.lua
deleted file mode 100644
index 3fe4811..0000000
--- a/LuaSL/testLua/luaprocTest1.lua
+++ /dev/null
@@ -1,41 +0,0 @@
1require "luaproc"
2
3result, error_msg = luaproc.createworker()
4if not result then print(error_msg) end
5result, error_msg = luaproc.createworker()
6if not result then print(error_msg) end
7result, error_msg = luaproc.createworker()
8if not result then print(error_msg) end
9result, error_msg = luaproc.createworker()
10if not result then print(error_msg) end
11
12result, error_msg = luaproc.newproc( [=[
13
14 local count = 0
15
16-- Hmm, luajit 2 beta 9 crashes at about 8140, lua can go up to 50000 at least.
17 for i = 1, 8000 do
18 local channel = "channel" .. i
19-- local proc = 'print(luaproc.receive("channel' .. i .. '") .. " " .. ' .. i ..')'
20 local proc = 'luaproc.receive("' .. channel .. '")'
21
22-- print(channel .. "\n" .. proc)
23 result, error_msg = luaproc.newchannel(channel)
24 if not result then print(error_msg) end
25 result, error_msg = luaproc.newproc(proc)
26 if not result then print(error_msg) else count = count + 1 end
27 end
28
29 print("Started " .. count .. " Lua threads")
30
31 if 0 ~= count then
32 for i = 1, count do
33 result, error_msg = luaproc.send("channel" .. i, 'luaproc is working fine! ' .. i)
34 if not result then print(error_msg .. " " .. i) end
35 end
36 end
37]=] )
38if not result then print(error_msg .. " for main proc") end
39
40luaproc.exit()
41