2
0

test_conc.lua 751 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. assert(type(stable.get) == "function")
  10. assert(type(stable.set) == "function")
  11. cgilua.put"stable.pairs = {<br>\n"
  12. for i, v in stable.pairs () do
  13. cgilua.put (i.." = "..tostring(v).."<br>\n")
  14. end
  15. cgilua.put"}<br>\n"
  16. local counter = stable.get"counter" or 0
  17. stable.set ("counter", counter + 1)
  18. local f = stable.get"f"
  19. if not f then
  20. local d = os.date()
  21. stable.set ("f", function () return d end)
  22. else
  23. cgilua.put ("f() = "..tostring (f ()))
  24. end
  25. cgilua.put"<br>\n"
  26. for i = 1,800 do
  27. cgilua.put (i)
  28. for ii = 1,1000 do
  29. cgilua.put ("<!>")
  30. end
  31. cgilua.put ("\n")
  32. end
  33. cgilua.put ("End")