-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
proposed on_reload (unsure where it would be put, perhaps a new namespace called meta?)
would make it easier for plugins that manage other plugins to clear any information would otherwise accumulate negatively over reloads.
e.g.
rom.<namespace>.on_reload(function(env)
my_callbacks[env._PLUGIN.guid] = {}
end)or
rom.<namespace>.on_reload(function(env)
local callbacks = my_callbacks[env._PLUGIN.guid]
if callbacks == nil then return end
for k in pairs(callbacks) do
callbacks[k] = nil
end
end)or it could be used to declare some features inert in preparation for a reload as they might not make sense in that context (e.g. managing external state like sockets, file handles etc.).
unsure if there's any benefit in an on_reload.post variant, I suppose it could be used for removing any flags that might have been set in on_reload.pre.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request