aboutsummaryrefslogtreecommitdiff
path: root/tests/h.lua
diff options
context:
space:
mode:
authorame <[email protected]>2024-05-09 10:31:26 -0500
committerame <[email protected]>2024-05-09 10:31:26 -0500
commit0e352b5254e53ff5410eaef0f2e6c973f7935ed7 (patch)
tree406d0e6dc1a7a525b4dd0be05b1fc35a2dd8de4a /tests/h.lua
parent34e6285c3d3bdb31eb476d13d4d083757a51bfe6 (diff)
work on memory saftey
Diffstat (limited to 'tests/h.lua')
-rw-r--r--tests/h.lua22
1 files changed, 19 insertions, 3 deletions
diff --git a/tests/h.lua b/tests/h.lua
index 9cddc29..b8ccd13 100644
--- a/tests/h.lua
+++ b/tests/h.lua
@@ -1,14 +1,30 @@
require "llib"
llib.thread.lock(1)
+llib.thread.lock(2)
+llib.thread.unlock(2)
local thread_a = llib.thread.async(function (res)
--os.execute("sleep 1")
--print((_G.ll + "hi"):final())
-
- res(_G.llib.crypto.md5("meow"))
+ print("waiting..")
+ llib.thread.lock(1)
+ print("signal!")
+ res(_G.llib.crypto.md5())
print("after")
end)
-print(thread_a:await())
+os.execute("sleep 1")
+llib.thread.unlock(1)
+
+awa = thread_a:await()
+
+os.execute("sleep 1")
+for i=1,999 do
+print((awa + "hi"):final())
+end
+
+thread_a:clean()
+
+print("clean exit")