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

Created a custom awaiter that guarantees that we complete on a different threadpool thread. #606

Conversation

leeoades
Copy link
Contributor

@leeoades leeoades commented Dec 2, 2024

Previously, an awaited Task had a non-zero chance of completing before it was awaited, in which case execution would continue on the same thread. I created a unit test that repeatedly attempted to lose the context in order to detect race conditions which proved that other techniques (using Task) simply reduced the probability instead of guaranteeing success.

… and System.Net.Http versions that have been flagged as containing known high severity vulnerabilities.
…ent threadpool thread. Previously, an awaited Task had a non-zero chance of completing before it was awaited, in which case execution would continue on the same thread.
@leeoades leeoades force-pushed the bugfix/really-guarantee-sync-context-lost branch from e028625 to 4941336 Compare December 2, 2024 21:33
@leeoades
Copy link
Contributor Author

leeoades commented Dec 2, 2024

Rebased onto #608 in order to remove the dodgy dependencies.

@crozone crozone merged commit 94867a0 into dotnet-state-machine:dev Dec 3, 2024
1 check 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