Debian Codegraph @

dokidoki/private/will.lua

raw symbols SCIP
1 require "dokidoki.module"
2 [[ attach_will ]]
3
4 will_key =
5 setmetatable({}, {__tostring = function () return "<private will>" end})
6
7 function attach_will(t, fn)
8 t[will_key] = make_will(fn)
9 end
10
11 function make_will(fn)
12 local will = newproxy(true)
13 getmetatable(will).__gc = function () fn() end
14 return will
15 end
16
17 return get_module_exports()