diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/h.lua | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/tests/h.lua b/tests/h.lua index c96e98e..ca946fc 100644 --- a/tests/h.lua +++ b/tests/h.lua @@ -1,6 +1,6 @@ require "llib"
-llib.thread.lock(1)
+--llib.thread.lock(1)
--llib.thread.lock(2)
--llib.thread.unlock(2)
@@ -8,21 +8,25 @@ local thread_a = llib.thread.async(function (res) --os.execute("sleep 1")
--print((_G.ll + "hi"):final())
print("waiting..")
- llib.thread.lock(1)
+ --llib.thread.lock(1)
+ _G.test = 5
print("signal!")
- res()
+ res(llib.thread.async(function (res)
+ print(test)
+ res(test)
+ end))
print("after")
end)
-os.execute("sleep 1")
-print("unlock")
-llib.thread.unlock(1)
+--os.execute("sleep 1")
+--print("unlock")
+--llib.thread.unlock(1)
awa = thread_a:await()
+print(awa:await())
--print((awa + "hi"):final())
-os.execute("sleep 1")
thread_a:clean()
print("clean exit")
|
