From af09c42e8067dfc832f7e1dce92860e1022c75fa Mon Sep 17 00:00:00 2001 From: amelia squires Date: Tue, 14 Oct 2025 21:46:38 -0500 Subject: tons of thread changed, more testing needed --- tests/kill.lua | 15 +++++++++++++++ tests/tests.lua | 1 - 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tests/kill.lua (limited to 'tests') diff --git a/tests/kill.lua b/tests/kill.lua new file mode 100644 index 0000000..53344dc --- /dev/null +++ b/tests/kill.lua @@ -0,0 +1,15 @@ +local llby = require"lullaby" + +local t = llby.thread.async(function(res) + for i = 1, 50 do + print(i) + os.execute("sleep 1") + end +end) + +os.execute("sleep 5") + +print("killing") +t:close() +t:await() +print("after kill") diff --git a/tests/tests.lua b/tests/tests.lua index 6dae570..39c4d12 100644 --- a/tests/tests.lua +++ b/tests/tests.lua @@ -20,7 +20,6 @@ end local handle = assert(io.popen("find tests/units/".. search .." -type f")) for file in handle:lines() do - print(_G._locals) total = total + 1 local f = loadfile(file)() -- cgit v1.2.3