Calls a function on each valid #GHook and destroys it if the function returns false.
true if hooks which are currently running (e.g. in another thread) are considered valid. If set to false, these are skipped
the function to call for each #GHook
Calls a function on each valid #GHook and destroys it if the function returns false.