adds :wrap_handler() and :finally() - #53
Merged
Merged
Conversation
lePereT
force-pushed
the
next_wrap_handler
branch
from
November 9, 2025 13:59
b369abe to
64ded93
Compare
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.
What type of PR is this?
Description
Extends the core event system in
fibers.opwith CML-style exception handling and cleanup combinators.Event:wrap_handler(handler)for post-synchronisation exception recovery.Event:finally(cleanup)for guaranteed cleanup on both success and failure paths.compile_eventto carry handler chains and apply them in innermost-first order.bracketto usefinallyfor unified resource cleanup.tests/test_op.luacovering nestedwrap_handler, builder errors, andfinallysemantics.Related Issues, Tickets & Documents
N/A
Screenshots/Recordings
N/A
Manual test
Manual test description
Executed
tests/test_op.lua; all new and existing cases pass, confirming correct behaviour ofwrap_handlernesting andfinallycleanup logic.Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?
None.