From 29c04b4c2e892ed7b19831e8a019e6e8465e7c46 Mon Sep 17 00:00:00 2001 From: ame Date: Wed, 16 Jul 2025 00:37:56 -0500 Subject: thread.close and small thread changes --- tests/mutex.lua | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'tests') diff --git a/tests/mutex.lua b/tests/mutex.lua index 2e5ce4b..d141a02 100644 --- a/tests/mutex.lua +++ b/tests/mutex.lua @@ -1,23 +1,10 @@ local llby = require"lullaby" - -local mutex = llby.thread.mutex() - -llby.io.print_meta = 1 -llby.io.pprint(mutex) - local th = llby.thread.async(function(res) - mutex:lock() - os.execute("sleep 5") + print("start") + os.execute("sleep 4") print("thread") - mutex:unlock() end) -os.execute("sleep 1") -mutex:lock() -print("main") -mutex:unlock() -mutex:free() --- +print("outside") th:await() - -- cgit v1.2.3