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

tmr: prevent race condition on cancel #1048

Merged
merged 2 commits into from
Jan 12, 2024
Merged

tmr: prevent race condition on cancel #1048

merged 2 commits into from
Jan 12, 2024

Conversation

sreimers
Copy link
Member

@sreimers sreimers commented Jan 12, 2024

If tmr_cancel is called from multiple threads it's enough to cancel once. The behavior remains undefined if tmr_start is called from multiple threads in parallel and should prevented by the caller.

If `tmr_cancel` is called from two threads it's enough to cancel once.
@sreimers sreimers marked this pull request as ready for review January 12, 2024 09:14
@sreimers sreimers changed the title tmr: prevent timer race condition on cancel tmr: prevent race condition on cancel Jan 12, 2024
@sreimers sreimers merged commit ba844d9 into main Jan 12, 2024
46 checks passed
@sreimers sreimers deleted the tmr_active branch January 12, 2024 09:34
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.

1 participant