aboutsummaryrefslogtreecommitdiff
path: root/tests/kill.lua
blob: a1fa218ad7160b9f322143aff795faec12b5fc89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
local llby = require"lullaby"

local t, e = llby.thread.async(function(res)
  for i = 1, 50 do
    print(i)
    os.execute("sleep 1")
  end
end)

print(t, e)

print("killing")
t:close()
t:await()
print("after kill")

os.execute("sleep 0.1");