You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lua-llthreads/tests/test_join_gc.lua

17 lines
285 B
Lua

local llthreads = require "llthreads"
local CODE=[[
local function gc(fn)
local p = assert(newproxy())
assert(debug.setmetatable(p, { __gc = fn }))
return p
end
p = gc(function() print("hello from gc") end)
]]
local thread = llthreads.new(CODE)
thread:start()
thread:join()