Update Is Canceled.vi so it executes regardless of error in.#699
Merged
jasonmreding merged 1 commit intomainfrom Mar 27, 2026
Merged
Update Is Canceled.vi so it executes regardless of error in.#699jasonmreding merged 1 commit intomainfrom
jasonmreding merged 1 commit intomainfrom
Conversation
dixonjoel
approved these changes
Mar 27, 2026
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 does this Pull Request accomplish?
Is Cancelled.vinow always executes regardless oferror inand merges the error chain afterwards to preserve any existing errors.Why should this Pull Request be merged?
Measurements often use this API as part of loop shutdown/cleanup logic. If the call doesn't accurately reflect the cancellation status when there is an error, it is easy to write loops with race conditions that will never exit. This was observed in testing with the
Game of Lifeexample shown below.If cancellation occurs in between the call to
Is Cancelled.viandUpdate Results.vi, then theUpdate Results.viwill generate an error because the RPC has been cancelled and the result can no longer be sent to the client. This error then gets shifted around through the loop,Is Cancelled.viwill always returnfalsebecause of the error, and the loop never exits.Rather than force callers to know they have to call
Is Cancelled.viwith no error in these scenarios, it was decided it was harmless and less error prone to just always execute the core logic of the VI. The latest block diagram for the VI is shown below:What testing has been done?
Basic hand testing. No "hangs" of the
Game of Lifeexample were observed after making this change.