Added final callback after all listeners have been invoked.#6
Open
skywa04885 wants to merge 1 commit into
Open
Added final callback after all listeners have been invoked.#6skywa04885 wants to merge 1 commit into
skywa04885 wants to merge 1 commit into
Conversation
andsmedeiros
requested changes
Jun 16, 2022
Owner
andsmedeiros
left a comment
There was a problem hiding this comment.
Thank you very much for your contribution! I feel your changes are very plausible and fill in an important usability gap in the framework.
That said, please make these few improvements for me to accept your PR:
- Un-commit
.vscodedirectory - Instead of invoking
final_callbackinrun_signal_event(), invoke it inuel_evloop_run(). This way, we can also implement finalisers for other events later - Change
uel_event_config_signalsignature to take the finaliser as parameter - Document your changes in
README.md - Write unit tests for
uel_signal_emit_with_final_callback() - Re-generate the
Doxygendocs and commit them (right now, your commit deletes our docs)
If you have any trouble, I will gladly help.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When working with dynamic memory or object pools, and the number of listeners is dynamic, I needed to make possible that memory is freed or objects released safely after all listeners have been executed. I added this quickly (not sure if it's up to the standard or design you want), but might be a idea to implement this officially.