diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/h.lua | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/tests/h.lua b/tests/h.lua index 1472c89..9cddc29 100644 --- a/tests/h.lua +++ b/tests/h.lua @@ -1,18 +1,14 @@ -require "llib" - -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) - -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) - -print(thread_a:await()) -print(thread_b:await())
\ No newline at end of file +require "llib"
+
+llib.thread.lock(1)
+
+local thread_a = llib.thread.async(function (res)
+ --os.execute("sleep 1")
+ --print((_G.ll + "hi"):final())
+
+ res(_G.llib.crypto.md5("meow"))
+ print("after")
+end)
+
+print(thread_a:await())
+
|
