aboutsummaryrefslogtreecommitdiff
path: root/tests/h.lua
blob: 310d6a82950dbd2616cdd440f1167b1d16ecfd15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
llib = require "llib"

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())


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

--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")