Fix for the wrong return value of lf_check_deadline#559
Conversation
hokeun
left a comment
There was a problem hiding this comment.
Thanks for spotting and fixing this error!
|
There is one Python test failing, "Failed: src/DeadlineAnytime.lf in 0.04 seconds" which could be caused by this change, but there is a chance that the error is in the test rather than this PR's change. |
|
The error message is I think this is the issue caused by this PR's change. Line 84 in 90fabf9 I think one solution is as follows, assuming that |
There was a problem hiding this comment.
Pull request overview
Fixes lf_check_deadline() so it reports whether the currently executing reaction has missed its deadline even when invoke_deadline_handler is false.
Changes:
- Refactors
lf_check_deadline()to separate “deadline passed” from optional handler invocation. - Adjusts control flow so the function can return
trueeven when the handler is not invoked.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR fixes an error that
lf_check_deadline()with the argumentinvoke_deadline_handleroffalsereturnsfalseeven if the reaction has passed the deadline.