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 a potential duplicated completion invoking when task cancel #2319

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

onevcat
Copy link
Owner

@onevcat onevcat commented Nov 18, 2024

Fix a crash reported here: #2297 (comment)

There appears to be a brief window during which the callback can be accessed from another thread before the next lock is applied. This violates the assumption that the completion handler is invoked only once, leading to issues, particularly when task cancellation is involved.

There seems to be a short period that the callback can be accessed from another thread before the next lock
@onevcat onevcat merged commit 6d8b529 into master Nov 19, 2024
40 checks passed
@onevcat onevcat deleted the fix/duplicated-completion-call branch November 19, 2024 13:38
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