aboutsummaryrefslogtreecommitdiff
path: root/tests/units/thread-local-return.lua
blob: cc6c417a34f2bcf82af6bbc70da4cfa49760e4cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
local a = 224

local thread = llby.thread.async(function(res)
  local b = 948

  res(function(c)
    return a * b * c
  end)
end)

local fun = thread:await()

return fun(448) == 224 * 948 * 448