From 37dc46c19843f3328e06c7199548238f056c1a6b Mon Sep 17 00:00:00 2001 From: ame Date: Sat, 3 Aug 2024 02:30:02 -0500 Subject: fix tests, module based require, thread improvments --- tests/h.lua | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) (limited to 'tests/h.lua') diff --git a/tests/h.lua b/tests/h.lua index 310d6a8..9717650 100644 --- a/tests/h.lua +++ b/tests/h.lua @@ -1,31 +1,11 @@ -llib = require "llib" +llib = require "lullaby" +llib.config.set({print_meta = 1}) -llib.config.set({print_meta=1,max_depth=22}) ---llib.thread.lock(1) ---llib.thread.lock(2) ---llib.thread.unlock(2) -a = llib.thread.buffer(llib.crypto.md5()) +local a = llib.crypto.sha1() +local b = llib.thread.buffer(a) -print(a:get():final()) -for i=1,2009 do - llib.thread.async(function (res) - --llib.io.pprint(a); - --l = a + a - --a:mod(function(e) return e:update("meow") end) - end) -end +llib.io.pprint(a) +llib.io.pprint(b) +llib.io.pprint((b + "meow"):final()) ---os.execute("sleep 1") -print(a:get():final()) ---print("unlock") ---llib.thread.unlock(1) - - ---awa = thread_a:await() - ---print(awa:await()) ---print((awa + "hi"):final()) ---thread_a:clean() - -print("clean exit") -- cgit v1.2.3