aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorame <[email protected]>2024-05-07 14:09:48 -0500
committerame <[email protected]>2024-05-07 14:09:48 -0500
commit3200f04de946049e950c6f7fd1e9d4d2f599c9ea (patch)
tree68a9e2f5e2f496fc630d036fd27f2aae9fb2ad23 /tests
parenta571dd1ac9fc4d46e0bbc95a3ab88f52ee37b1a1 (diff)
more work on threads
Diffstat (limited to 'tests')
-rw-r--r--tests/h.lua22
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/h.lua b/tests/h.lua
index 0a0cfdd..1472c89 100644
--- a/tests/h.lua
+++ b/tests/h.lua
@@ -1,16 +1,18 @@
require "llib"
-local th = llib.thread.async(function (res)
- _G.llib.io.pprint(res)
- _G.llib.io.pprint({aa=45})
- res:res(_G.llib.crypto.md5())
+local thread_a = llib.thread.async(function (res)
+ --os.execute("sleep 1")
+ --print((_G.ll + "hi"):final())
+ res:res(_G.llib.crypto.md5("meow"))
print("after")
end)
-os.execute("sleep 1")
-
-print("out:")
-a = th:res();
-print((a + "hi"):final())
+local thread_b = llib.thread.async(function (res)
+ --os.execute("sleep 1")
+ --print((_G.ll + "hi"):final())
+ res:res(_G.llib.crypto.sha512("meow"))
+ print("after")
+end)
-while true do end \ No newline at end of file
+print(thread_a:await())
+print(thread_b:await()) \ No newline at end of file