Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix race condition in TimerUpdateTrigger stop #231

Merged
merged 1 commit into from
Sep 3, 2021

Conversation

RobertBeekman
Copy link
Collaborator

Calling Stop() waits for the task to finish but if it's already cancelled when it starts waiting it throws a TaskCancelledException
This is a race condition and depending on how long the task takes to cancel it either occurs or it doesn't.

Copy link
Owner

@DarthAffe DarthAffe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if i'm a fan if ignoring only the AggregateException here - but for now it's fine - i'll think about that later

@RobertBeekman
Copy link
Collaborator Author

I did try to look for a more official way to catch this but couldn't find any (though I didn't look for more than 15 mins or so)

@RobertBeekman RobertBeekman merged commit 3074a2b into Development Sep 3, 2021
@RobertBeekman RobertBeekman deleted the Core/UpdateTriggerCancel branch September 3, 2021 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants