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

Fixed race condition on Win poll #45

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Andrepuel
Copy link

Fixes #44

Two arcs and one Box were all merged into one single Pin<Box<>> by using a self referential structure.

Also, a dynamic dyspatch as removed in favor of using generics
It was possible that a thread would read resync as false before another thread set it to true and subsequently register a waker after the other thread set resync to true and already tried calling AtomicWaker::wake().

To fix this issue, we first register the waker, and only then we check the resync value. If resync is true and we didn't have to register the waker, we just take it back.
@Andrepuel
Copy link
Author

Fixed cargo fmt

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.

Possible race condition on Windows platform causing task to never wake
1 participant