Skip to content

Fix race in 'executeOperation(props:operation)'#9

Merged
mattmassicotte merged 1 commit intomattmassicotte:mainfrom
mchakravarty:main
May 28, 2025
Merged

Fix race in 'executeOperation(props:operation)'#9
mattmassicotte merged 1 commit intomattmassicotte:mainfrom
mchakravarty:main

Conversation

@mchakravarty
Copy link
Contributor

If the task got cancelled while still waiting for dependencies, 'completePendingTask(with:)' was not executed, leaving a zombie in the queue.

The fix is to move the defer clause to the very beginning of the function.

If the task got cancelled while still waiting for dependencies, 'completePendingTask(with:)' was not executed, leaving a zombie in the queue.
@mattmassicotte
Copy link
Owner

Ugh wow, great find. I hope this didn't cause you too much trouble.

I'd like to add a test to expose this problem, but that's non-critical.

(also, safe to ignore that linux CI failure, known issue and I need to resolve it anyways)

@mattmassicotte mattmassicotte merged commit 70342c9 into mattmassicotte:main May 28, 2025
27 of 36 checks passed
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.

2 participants

Comments