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

Store pending oneshot for subscriber future #1314

Merged
merged 3 commits into from
Apr 23, 2021
Merged

Conversation

asonix
Copy link
Contributor

@asonix asonix commented Apr 1, 2021

Fixes #1313

Add a field on Subscriber to store a oneshot after getting a pending poll. It's possible we'll need to pull some extra waker shenanigans in order to ensure we wake up when the oneshot becomes ready, but I'm not versed enough in this codebase to know that yet.
This change also removes an unneeded use of unsafe (I think this is fine, but let me know if it was there for a reason)

@asonix
Copy link
Contributor Author

asonix commented Apr 1, 2021

It looks like OneShot is handling it's own waking, so this change should be fine

@asonix
Copy link
Contributor Author

asonix commented Apr 2, 2021

I've implemented this fix for next_timeout as well, since previously it would drop incomplete oneshots.

@spacejam
Copy link
Owner

Thanks for adding this fix, @asonix ! I am hoping to cut a new release this weekend if I can get a bit of necessary stabilization work done, which will include this fix :)

@spacejam spacejam merged commit 334e737 into spacejam:main Apr 23, 2021
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.

Subscriber as a Future occasionally skips records (but as an Iterator it does not)
2 participants