luci-app-mwan3: add dependecy to size option
[project/luci.git] / libs / luci-lib-nixio / axTLS / www / lua / test_conc.lua
1 cgilua.htmlheader()
2 if ap then
3         local pid, ppid = ap.pid ()
4         if not ppid then
5                 ppid = "no parent pid"
6         end
7         cgilua.put ("pid = "..pid.." ("..ppid..")".."\n")
8 end
9
10 assert(type(stable.get) == "function")
11 assert(type(stable.set) == "function")
12
13 cgilua.put"stable.pairs = {<br>\n"
14 for i, v in stable.pairs () do
15         cgilua.put (i.." = "..tostring(v).."<br>\n")
16 end
17 cgilua.put"}<br>\n"
18
19 local counter = stable.get"counter" or 0
20 stable.set ("counter", counter + 1)
21
22 local f = stable.get"f"
23 if not f then
24         local d = os.date()
25         stable.set ("f", function () return d end)
26 else
27         cgilua.put ("f() = "..tostring (f ()))
28 end
29
30 cgilua.put"<br>\n"
31 for i = 1,800 do
32         cgilua.put (i)
33         for ii = 1,1000 do
34                 cgilua.put ("<!>")
35         end
36         cgilua.put ("\n")
37 end
38 cgilua.put ("End")