From 8d169e81694b587a425993cb11297e8a9183b37c Mon Sep 17 00:00:00 2001 From: ame Date: Mon, 13 May 2024 23:43:46 -0500 Subject: setsockopt before bind --- tests/h.lua | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'tests') 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") -- cgit v1.2.3