diff options
Diffstat (limited to 'tests/h.lua')
| -rw-r--r-- | tests/h.lua | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/tests/h.lua b/tests/h.lua index ca946fc..412d09c 100644 --- a/tests/h.lua +++ b/tests/h.lua @@ -1,32 +1,29 @@ require "llib"
+llib.config.set({print_meta=1,max_depth=22})
--llib.thread.lock(1)
--llib.thread.lock(2)
--llib.thread.unlock(2)
+a = llib.thread.buffer(llib.crypto.md5())
-local thread_a = llib.thread.async(function (res)
- --os.execute("sleep 1")
- --print((_G.ll + "hi"):final())
- print("waiting..")
- --llib.thread.lock(1)
- _G.test = 5
- print("signal!")
- res(llib.thread.async(function (res)
- print(test)
- res(test)
- end))
- print("after")
-end)
+a:mod(function(e) return e end)
+print("hi")
+for i=1,20 do
+ llib.thread.async(function (res)
+ a:mod(function(e) return e:update("meow") end)
+ end)
+end
---os.execute("sleep 1")
+os.execute("sleep 1")
+print(a:get():final())
--print("unlock")
--llib.thread.unlock(1)
-awa = thread_a:await()
+--awa = thread_a:await()
-print(awa:await())
+--print(awa:await())
--print((awa + "hi"):final())
-thread_a:clean()
+--thread_a:clean()
print("clean exit")
|
