Skip to content

Fix case where async receivers could miss wake ups#177

Open
Imberflur wants to merge 2 commits into
zesterer:masterfrom
Imberflur:async-read-fix
Open

Fix case where async receivers could miss wake ups#177
Imberflur wants to merge 2 commits into
zesterer:masterfrom
Imberflur:async-read-fix

Conversation

@Imberflur
Copy link
Copy Markdown
Contributor

Between checking for a message and re-adding the hook to the queue it is possible for the receiver to miss a wake up for a new message. Previously, there was a check afterwards for disconnects but not for new messages.

I added a new test that failed before this commit.

Inspired by https://github.com/rklaehn/flume-bug-reproducer/ (although that mistakenly identified this bug as an issue with cancellation safety).

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