diff options
| author | ame <[email protected]> | 2024-05-13 23:43:46 -0500 |
|---|---|---|
| committer | ame <[email protected]> | 2024-05-13 23:43:46 -0500 |
| commit | ce5051ab905a1751effebb8658caf9ed15b2be62 (patch) | |
| tree | ec8511e3939ae1c7be21c7ccb3a3519b6bdb8c8b /tests/h.lua | |
| parent | 897f5843d61cc2d827b719e27d83d7f9cff3a20e (diff) | |
setsockopt before bind
Diffstat (limited to 'tests/h.lua')
| -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")
|
