Thread dispatchOverview
oth.unhook
Represents removal of a thread-dispatch callback.
Details#
Restores a target intercepted through oth.hook. Returns true when an oth hook was removed, false otherwise. This is separate from the hookfunction restoration registry.
Examples#
Example
local target = newcclosure(function() return 1 end)
oth.hook(target, function() return 2 end)
print(oth.unhook(target)) -- true
print(target()) -- 1