aboutsummaryrefslogtreecommitdiff
path: root/tests/h.lua
diff options
context:
space:
mode:
authorame <[email protected]>2024-05-13 23:43:46 -0500
committerame <[email protected]>2024-05-13 23:43:46 -0500
commit8d169e81694b587a425993cb11297e8a9183b37c (patch)
treeec8511e3939ae1c7be21c7ccb3a3519b6bdb8c8b /tests/h.lua
parenta84adf91992f19581e05ac617af7c259ec6b9d33 (diff)
setsockopt before bind
Diffstat (limited to 'tests/h.lua')
-rw-r--r--tests/h.lua18
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")