notifications: avoid returning after success#124
Open
praneelmalapaka wants to merge 1 commit into
Open
Conversation
Signed-off-by: Praneel Malapaka <z5448041@ad.unsw.edu.au>
Member
|
Generally, most of the tutorials end with a cap fault, and that is not a problem as such, but you might be right that this relates to #100 because the consumer might reach the fault before the "Success!" print is finished. Will need to have a closer look. |
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.
Summary
The
notificationstutorial solution can printSuccess!and then fault intcb_consumerat address0after returning frommain.This change keeps the consumer alive after printing
Success!by yielding in a loop instead of returning frommain.Testing
I reproduced the issue locally with the notifications solution:
Before this change, the tutorial reached
Success!and then produced a post-success fault similar to:After this change, the tutorial reaches
Success!and no longer produces the post-successtcb_consumerfault in my local run.Notes
This appears related to the existing CI issue where the notifications simulation can reach success but later fail or time out after a
tcb_consumerfault.Related to #100